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, 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()





--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to