the "real" way is thorugh the mapper:

mapper.get_property('foo', resolve_synonyms=True)

On May 25, 2010, at 9:12 AM, Kent wrote:

> One answer is, I believe, use the name property to access the mapped
> property, like this:
> 
> prop.parent.get_property(prop.name)
> 
> Is there a better way?
> 
> 
> On May 25, 8:54 am, Kent <k...@retailarchitects.com> wrote:
>> When introspecting a mapper, we can figure out the class type of its
>> properties like this:
>> 
>> For ColumnProperty:
>>     prop.columns[0].type.__class__
>> For RelationProperty (relationship):
>>     prop.argument
>> For RelationProperty (backref):
>>     prop.argument.class_
>> 
>> How do I determine the class type a SynonymProperty is expected to
>> house?
>> 
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "sqlalchemy" group.
>> To post to this group, send email to sqlalch...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> sqlalchemy+unsubscr...@googlegroups.com.
>> For more options, visit this group 
>> athttp://groups.google.com/group/sqlalchemy?hl=en.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To post to this group, send email to sqlalch...@googlegroups.com.
> To unsubscribe from this group, send email to 
> sqlalchemy+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/sqlalchemy?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to