Ok, missed that FAQ. Anyway, yes, it works with the relationship
declared inside the class declaration and the entirety of the and_
clause in quotes.

Thanks,
Sam

On May 11, 3:35 pm, Michael Bayer <[email protected]> wrote:
> On May 10, 2011, at 6:09 AM, nostradamnit wrote:
>
>
>
> >    #features = relationship('Feature')
> >    ui_metadata = relationship('UIMetadata',
> > primaryjoin=and_('category.c.id==ui_metadata.c.class_id',
> > 'ui_metadata.c.class_type=="Category"'))
>
> the mistake happening here regards the usage of and_() with string based 
> criterion.   There's a description of this in the FAQ:
>
> http://www.sqlalchemy.org/trac/wiki/FAQ#ImusingDeclarativeandsettingp....

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

Reply via email to