Oh, i would never recommend turning off the identity mapthe second patch below is more for educational means, which is why I say its "definitely worth trying" - I was amazed at how fast things started to break down when i tried it. having the mapper re-fetch the attributes on every select is
Well, I have a temporary fix for my project, and it is pretty similar to the last.
I changed the object_mapper function from mapper.py to be this:
def object_mapper(object):
"""given an object, returns the primary Mapper associated with the object
or the object's class."""
if hasattr(o
I'm really suspicious of this because the other ORM whose design I really admire, the Java SimpleORM, also has an identity map with no way to turn it off, and its author has put a hell of a lot of thought into it. FWIW.
On 3/26/06, Michael Bayer <[EMAIL PROTECTED]> wrote:
this patch will cause the
On 3/26/06, Florian Boesch <[EMAIL PROTECTED]> wrote:
So how do you scale/split your application across multiple data accessingservers (short of writing an application server)?What problems does an identity map pose to multiple client processes?
I'm confused because you seem to imply that if you co
On 3/26/06, Jonathan Hayward http://JonathansCorner.com <[EMAIL PROTECTED]
> wrote:
2: What is the best way to store a list of strings as a field in adatabase? (If need be I can have a delimiter-separated string, but Iwant to know if there is a better method.)
You need a one-to-many join.
So you'
I am pleased to announce release 0.1.5 ! thanks to everyone who has
helped patch, identify, suggest, illustrate, and that includes
everyone on this list.
changelog:
0.1.5
- added SQLSession concept to SQLEngine. this object keeps track of
retrieving a
connection from the connection pool a
hey michael -I committed another small thing to mapper to help some more with this. with a regular mapper->mapper inheritance, the submapper can specify the same table as the parent. I worked up many-to-many relationships on both Test and Test1 (to test that you can stick them on the child object
On 3/26/06, Florian Boesch <[EMAIL PROTECTED]> wrote:
And yes, I'm also *SICK* of putting up with an endless stream of bugs that keepcreeping up and slowing me down."I demand you make this alpha software production-quality immediately!"
Grow up, dude.May I suggest digging into the code and fixing t
It seems that this problem is giving me more trouble than I originally
thought. If I create a many-to-many relation between the baseclass Test
and some other class Foo to get the attribute foos, then it doesn't
work with Test1 and Test2 instances. a = Test1(); a.foos.append(Foo());
objectstore.comm
and anyway, SVN changeset 1216 :
m = mapper(class, table, always_refresh=True)
anytime that mapper pulls an already-loaded object from the identity
map when traversing a rowset, it will overwrite the object's
properties with the rowset's data. will blow away any changes on
that ob
On Mar 26, 2006, at 5:56 PM, Florian Boesch wrote:
And yes, I'm also *SICK* of putting up with an endless stream of
bugs that keep
creeping up and slowing me down.
SA was only released as an SVN checkout in November. its going to
have a lot of bugs for many months. not like ive been wor
units of work are by definition localized to a particular in-process
thread-local session. there is no magical "machine-spanning" unit of
work going on. if you are looking for some kind of "global
database" where all data is always exactly fresh to all processes
everywhere, that would ha
And yes, I'm also *SICK* of putting up with an endless stream of bugs that keep
creeping up and slowing me down.
I'm empathic, don't get me wrong, and hurray, the last two svn updates I did
didn't break my whole application and mostly still have all issues I report and
produced test programms for
As we're down to mutual shouting,
Yes Michael, hibernate may be hugely popular, and I may not know it, but from
what I hear hibernate scales across a cluster of machines...
How does SA scale across a cluster of machines?
I don't see how this works with SA. I'd be happy if you enlighten my ways b
this patch will cause the mapper to reload all the properties in
identity-mapped objects every time a SELECT statement comes across
it, blowing away any changes that might have been made to the object
in memory. it maintains the unique per-session identity map of
instances:
Index: lib/
firebird doesnt work at all right now AFAIK...if it actually did some
things correctly, thats great news. the creator/maintainer of the
module has been on vacation until this week, and has not yet gotten
around to the initial testing of the module which I committed into
SVN for him a few
I am using 3.2 Kinterbasdb with latest svn sqlalchemy.
I've defined tables using autoload, but primary_key = False in all the tables
loaded.
Also it doesn't seem to create foreign keys either.
Anyone know if this is supposed to work with firebird?
--
Brad Clements,[EMAIL P
Ha! objectstore.commit() was where I all did it for!
I will stick to the plan figuring how PyObjC decides what a list is.
Then I will someway let it decide the mapper results are also lists.
Thanks for your quick replies!
Koen
On 26-mrt-2006, at 23:02, Michael Bayer wrote:
On Mar 26, 200
On Mar 26, 2006, at 3:48 PM, Koen Bok wrote:
Does indeed work, but orders[1].products is still an
object. Is there a way to convert all of the relation results to
lists?
not really, since a plain list cannot track changes you have made to
that list, and a plain list also does not enfo
So how do you scale/split your application across multiple data accessing
servers (short of writing an application server)?
Calling objectstore.clear() everywhere?
Quoting Michael Bayer <[EMAIL PROTECTED]>:
> theres no caching in SQLAlchemy. theres an identity map which has
> some of the same e
well there are already two projects in this vein:
http://cleverdevil.org/computing/35/declarative-mapping-with-sqlalchemy
http://trac.pocoo.org/wiki/DatabaseApi
On Mar 26, 2006, at 2:57 PM, David Geller wrote:
I realize that this is up to Ian, and I know he has some problems
with certain as
I put into the wiki's recipe section a working version of all this,
for those who are interested.
Incidentally -- I know the join's ambiguous, but while we're guessing
with cascade_mapper (that is, if it's going to be used as a feature),
we might as well guess intelligently. Does the current
well other folks have been asking that it return a generator object which dynamically executes the query at the moment you ask for a slice of it.you can always go with orders = list(Order.mapper.select(limit=3)) to assure the type.any particular reason "list" is so important ? whats python without
theres no caching in SQLAlchemy. theres an identity map which has
some of the same effects as a cache. basically, if you have already
loaded your object into the current session, thats it. if you load
it again, its going to use the same one you have, unless you clear
the session, or refr
im not a huge fan of cascade_mapper for reasons like this.
since you have an ambiguous join, perhaps youre looking for explicit
join conditions ?
http://www.sqlalchemy.org/docs/
adv_datamapping.myt#adv_datamapping_relations_customjoin
On Mar 26, 2006, at 1:05 PM, Gambit wrote:
Hi guys -
I realize that this is up to Ian, and I know he has some problems with
certain aspects of SA architecture, but doesn't it make sense for there
to be a "SO compatibility layer" to SA, rather then continuing a
completely separate SO? This, since it seems SO performs a subset of
what SA is capabl
When I make a selection with a mapper I get back an object. Same goes for the mapper's relations.Is there any way to make SQLAlchemy returning standard objects?Example:orders = list()print type(orders) #orders = Order.mapper.select(limit=3)print type(orders)print orders[, , ] # Looks like a list,
On 3/26/06, Jonathan Ellis <[EMAIL PROTECTED]> wrote:
On 3/25/06, Jonathan Hayward http://JonathansCorner.com
<[EMAIL PROTECTED]
> wrote:
A few questions:1: How do I specify a string of indeterminate length in the pseudocode
at the bottom of this list? It will be a usability bug if I setarbitrary
Seemingly SA is fairly liberal with interpreting my wish to get stuff from the
database.
So what's the pattern to deal with "session" "caching"?
I hear there's expunge etc. now, and expire, but that's all when I know what
objects I want to have removed/expired/refreshed. Fact is, I don't, I would
Hi guys -
I'm not sure this is a bug or not, but if not it might be worth
adding a comment to the documentation.
Using the following schema:
table A:
pk
B_fk_1
B_fk_2
...
table B:
pk
info
After setting up A and B correctly (see attachment), and
On 3/25/06, Jonathan Hayward http://JonathansCorner.com <[EMAIL PROTECTED]
> wrote:A few questions:1: How do I specify a string of indeterminate length in the pseudocode
at the bottom of this list? It will be a usability bug if I setarbitrary limits on how long things can be?Just don't specify a le
Great,
I'll check out the latest revision. There was another issue that I ran
into a couple hours ago. That is, if you turn database echo on for the
test2 example you can see that every time you make a call like
Test.get(1) or Test.get(2) the object is reloaded from the database. I
believe that th
32 matches
Mail list logo