[sqlalchemy] Re: Polymorphic adjacency lists and many-to-many

2015-02-15 Thread YKdvd
Thanks for the pointer to the Generic Associations page, somehow I managed to miss that. I had the same qualms about referential integrity as the generic foreign description, but was hoping I was missing something. Doing separate association tables isn't really a big problem, just a bit of

[sqlalchemy] session.add order

2015-02-15 Thread Victor Poluksht
I've found that sometimes sqlalchemy inserts objects during session.commit() not in the order they have been added using session.add() I've put my code example and the output to the github gist. https://gist.github.com/vpol/8da4a512308ae351eaf6 My question is similar to this one:

Re: [sqlalchemy] session.add order

2015-02-15 Thread Michael Bayer
the order in which you put things into session.add() is significant only within the scope of a certain mapped class, that is, the order that you put a bunch of Foo() objects into session.add() will be maintained, however a series of Bar() objects are handled separately. Between different object

Re: [sqlalchemy] idle in transaction

2015-02-15 Thread Jonathan Vanasco
On Saturday, February 14, 2015 at 9:58:26 PM UTC-5, Ed Rahn wrote: This seems like a fairly common use case, do people just not care about it or how do they handle it? This isn't common, and looks like an anti-pattern. Consider these lines from your emails - they're not really compatible

Re: [sqlalchemy] idle in transaction

2015-02-15 Thread Michael Bayer
Ed Rahn edsr...@gmail.com wrote: On 02/13/2015 11:30 PM, Michael Bayer wrote: Ed Rahn edsr...@gmail.com wrote: I have several programs that are Multi Process and long running, they open up 30 or so connections and do selects periodically. For a select query, the default behaviour is to