Hi Michael, I'm creating the session by:
Session = sessionmaker(bind = engine, autoflush = True, transactional = True) session = Session() and I'm not using any threading at all (therefore no thread-local storage). The only thing between the commit and the next query is some reporting of statistics (using sys.stdout). I'm getting a constraint violation IntegrityError. Thanks again for any help! Mark On Oct 1, 12:47 pm, Michael Bayer <[EMAIL PROTECTED]> wrote: > On Oct 1, 2007, at 12:12 PM, [EMAIL PROTECTED] wrote: > > > > > Hi Michael, > > > As I tried to show in the pseudo-code, the INSERTS look like they're > > happening during the query (in step 1), well after the save/commit. I > > even tried to add a flush and, when I turn on echo mode, I see inserts > > happening at the query step. Is this even possible? > > > Mark > > OK by "code example" im looking for: > > - are you on version 0.3 or 0.4 ? > > - how are you creating your session ? > > - using multiple threads ? are you keeping each session local to a > single thread ? > > - whats happening between steps 3 and 1 ? depending on how the > session is set up, yes > a flush() can be issued right before the query executes (i.e. > autoflush). But, according to your > workflow below, it should not; since you are calling a commit() at > the end. > > - what kind of IntegrityError youre getting...duplicate row insert ? > missing foreign key ? no primary key ? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---