James Brady ha scritto: > The problem I'm hitting at the moment is how to properly select simple > objects... There seems to be two main approaches, for example: > session.query(Ownership).select() or > ownership_table.select().execute() > > With the first approach, I get > InvalidRequestError: Parent instance <class 'tnf.model.Ownership'> is > not bound to a Session, and no contextual session is established; ... > which I'm not sure how tackle - there's no mention I can find of when > and where create_session should be called... >
Did you call assign_mapper on Ownership? > Can anyone answer these specific questions or point me in the > direction of some further documentation? > You should be able to call Ownership.query() just fine, if you have a working mapper. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---