On 4/17/07, Michael Bayer <[EMAIL PROTECTED]> wrote: > On Apr 10, 2007, at 10:22 AM, Gaetan de Menten wrote:
> > By the way, should I create a ticket for this? > ive created ticket #541 for this, I had already created ticket #531 for this. Sorry for not mentioning it here (I thought you'd see it). Anyway, it can be closed too now :). > and implemented a slightly refined > version of the patch you provided, including the classmethod as well > as a generative method + unit tests for both. I added docs and > examples for the generative version, so you can see the use cases i > was getting at. it will throw an error if you give it input that > makes no sense (i.e. two classes that are unrelated). > > the pattern looks like (assuming the user->address paradigm) : > > # without specifying the property > session.query(Address).with_parent(someuser).list() > > # specifying the property > session.query(Address).with_parent(someuser, > property='addresses').filter_by(email_address='[EMAIL PROTECTED]').list() That's just great! I was going to do it eventually but it seems like you beat me to it ;-). Thanks a lot. -- Gaƫtan de Menten http://openhex.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---