On Thu, 2010-05-20 at 19:15 +0200, Stefano Fontanelli wrote:
> 
> In my code I need to introspect the above objects, here an example:
> 
> for property in Account.mapper.iterate_properties:
>     if type(property) == RelationProperty:
>         print property.key, property.direction.name
> 
> 
> Here the output:
> 
> owner MANYTOONE
> groups MANYTOMANY
> roles MANYTOMANY
> children ONETOMANY
> setting ONETOMANY

I read the SQLA docs.
http://www.sqlalchemy.org/docs/mappers.html?highlight=direction%
20name#one-to-one

Then I understood the rationale behind this behaviour :-)
How can I check relation types?


-- 
Ing. Stefano Fontanelli
PhD Student, Scuola Superiore Sant'Anna
ReTiS Lab c/o CEIICP
Via G. Moruzzi, 1
56124 Pisa (Italy)
tel: +39 050 5492010, mobile: +39 333 3653294
skype: stefanofontanelli
homepage: http://retis.sssup.it/~stefano/

-- 
You received this message because you are subscribed to the Google Groups 
"SQLElixir" 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/sqlelixir?hl=en.

Reply via email to