On Jun 18, 2009, at 2:27 AM, AF wrote:
> > OK, next question. > > Well... two related questions. :) > > 1) In general, inside an object's method def, where I am doing > arbitrary calculations, how can I get access to the session the object > is bound to in order to run other queries? object_session(self) > 2) More specifically, I want to make a "filtered" and "computed" > version of an existing relation, how should I do this? I would use object_session(self).query(Class)... to create the appropriate query. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---