I don't suppose a full example that reproduces the behavior by itself is possible here ? if your program does not modify any data, then no autoflush would occur.
Gloria W wrote: > > Understood. In my constructor, I was using a shared global > declarative_base, and a single session instance: > > metdata = Base.metadata > engine = create_engine(config.db_conn) > engine.echo = False > Session = sessionmaker(bind=engine) > self.session = Session() > > Only the self.session variable is accessible to other methods. > I am only doing the two queries shown above, with the classes shown > above (the only difference is the removed order_by in the column as > recommended). I try flushing between the two, but to no avail. > > I'm now creating a new, independent session() in each method, and this > seems to work, but this doesn't seem right. I should be able to flush > and reuse the session, is this correct? > > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---