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 [email protected]
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
-~----------~----~----~----~------~----~------~--~---