Hello,
My migration to 0.4 didn't end well since now I sometimes get the following
error:
"sqlalchemy.exceptions.InvalidRequestError: Parent instance <class '
doupy.model.objects.JobPosting'> is not bound to a Session, and no
contextual session is established; lazy load operation of attribute 'author'
cannot proceed".
My SA setup code looks like this:
# module globals
Session = scoped_session(sessionmaker(autoflush=True, transactional=False))
metadata_cache = {}
# this is called only once, when application starts
engine = engine_from_config(...)
Session.configure(bind=engine)
# when processing web requests
Session.query(..)
Max.
* *
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---