Great! That works now. Thanks for the help. > if this is a self referential join, you have to alias the target you're > joining to. usually the aliased=True flag would be sufficient for the > join(), but since you want to contains_eager() it as well, this all must > be laid out explicitly: > > > parent = aliased(Asset) > > query.join((parent, Asset.parent)).options(contains_eager(Asset.parent, > alias=parent)) > > > > > >
-- David Gardner Pipeline Tools Programmer, "Sid the Science Kid" Jim Henson Creature Shop [email protected] --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
