[sqlalchemy] Re: extended inserts

2009-09-01 Thread David Howell
Right, INSERT in general doesn't support bulk inserts, but MySQL specifically does. MySQLdb generates an extended, single insert statement when you use executemany(). Anyway, it makes sense that the ORM layer wouldn't know how to generate bulk inserts for just on engine. I'll just have to drop

[sqlalchemy] dictionary changed size during iteration in check_modified() error

2009-09-01 Thread zopyxfil...@googlemail.com
We encounter the following error with SA 0.5.4p2 under Postgres 7.4 (Linux) from within Zope. Anyone seen this before? Andreas --- Error Type: exceptions.RuntimeError Error Value: dictionary changed size during iteration Traceback: File

[sqlalchemy] Complicated relations

2009-09-01 Thread Conor
Hello: I am trying to build a complicated relation, but am having trouble due to the following: * there are multiple intermediate tables involved * the relation requires EXISTS clauses as the join condition between several of these tables My model is shown below. The relation I am trying to

[sqlalchemy] Re: dictionary changed size during iteration in check_modified() error

2009-09-01 Thread Michael Bayer
zopyxfil...@googlemail.com wrote: We encounter the following error with SA 0.5.4p2 under Postgres 7.4 (Linux) from within Zope. Anyone seen this before? it is a known issue repaired in the 0.5.6 branch as well as trunk. Andreas --- Error Type: exceptions.RuntimeError

[sqlalchemy] Re: Local disk database caching and Session subclasses

2009-09-01 Thread Dimitri Tcaciuc
An update on the above, I goofed with subclassing since I had various interesting things in PYTHONPATH which caused issues. My original architecture question still applies tho. Dimitri. On Aug 31, 4:43 pm, Dimitri Tcaciuc dtcac...@gmail.com wrote: I'm working with SQLite databases located on

[sqlalchemy] Re: Complicated relations

2009-09-01 Thread Michael Bayer
Conor wrote: Hello: I am trying to build a complicated relation, but am having trouble due to the following: * there are multiple intermediate tables involved * the relation requires EXISTS clauses as the join condition between several of these tables My model is shown below. The

[sqlalchemy] Re: Local disk database caching and Session subclasses

2009-09-01 Thread Michael Bayer
Dimitri Tcaciuc wrote: My plan was that when an engine gets bound to session, I perform the database copy and create another engine which actually binds. When the session expires, temporary database is collected. But at this point, trying to make a simple Session subclass like so:     from

[sqlalchemy] Re: Complicated relations

2009-09-01 Thread Conor
On Sep 1, 12:13 pm, Michael Bayer mike...@zzzcomputing.com wrote: [...] have you considered the advice athttp://www.sqlalchemy.org/docs/05/mappers.html#building-query-enabled... ?    an embedded EXISTS subquery in a relation() doesn't seem like something that should be emitted implicitly -

[sqlalchemy] Re: Complicated relations

2009-09-01 Thread Michael Bayer
Conor wrote: On Sep 1, 12:13 pm, Michael Bayer mike...@zzzcomputing.com wrote: [...] have you considered the advice athttp://www.sqlalchemy.org/docs/05/mappers.html#building-query-enabled... ?    an embedded EXISTS subquery in a relation() doesn't seem like something that should be emitted

[sqlalchemy] Inferring joins from table A to table C via table B

2009-09-01 Thread Damon
Hi, Relatively new to SA and unable to find the answer in this group's archives. (Possibly my search-fu is weak, in which case I apologize but hope you'll point me in right direction.) We're building a generic DB query engine on SA using the ORM and mappers, but we can't seem to get SA to

[sqlalchemy] Re: Inferring joins from table A to table C via table B

2009-09-01 Thread Michael Bayer
Damon wrote: MUST we explicitly supply the join to such query objects? Or is there some way that SA can figure out that tbl_people_documents is in between tbl_people and tbl_documents on its own? Perhaps there is something we can add to the tbl_people/tbl_documents object definitions that

[sqlalchemy] Curious Problem

2009-09-01 Thread gizli
Hi all, I just discovered something weird when doing concurrency testing with my program. Before writing a simplified test case for it and really figuring out whether its a bug with sqlalchemy (I am using 0.5.5), I wanted to write the scenario here. Basically I was getting the infamous Set size

[sqlalchemy] declarative style many to many, possible fix

2009-09-01 Thread Jae Kwon
Is there a way to declaratively create many to many relationships where the 'secondary' parameter for the relationship is deferred ? I couldn't get this to work, e.g. class User(DeclarativeBase): id = Column(Integer, primary_key=True) name = Column(String(20)) groups =