[sqlalchemy] a relationship question

2014-03-25 Thread lars van gemerden
Hi all, Simple question, but couldn't find it in the docs: - How can i retrieve the target class in a relationship in the ORM? Say i have a sqla class with a relationship(User, primaryjoin = ...), how can i retrieve the User class from the relationship ('relationship' is a descriptor, right?)

Re: [sqlalchemy] a relationship question

2014-03-25 Thread Michael Bayer
you can get this with MyClass.user.property.mapper.class_ On Mar 25, 2014, at 12:50 PM, lars van gemerden l...@rational-it.com wrote: Hi all, Simple question, but couldn't find it in the docs: - How can i retrieve the target class in a relationship in the ORM? Say i have a sqla class