Yannick Gingras | 14 May 17:09

Re: Query filtering like isinstance()


Michael Bayer <mike_mp <at> zzzcomputing.com> writes:

>> Sounds good.  I didn't find how to get the polymorphic_identity of a
>> mapped class.  Is it possible to retried it if I have only the class
>> object?  This is not a big problem since I can use Item.__name__ as
>> the polymorphic_identity.
>
> class_mapper(cls).polymorphic_identity should work

It does.

Thanks!

--

-- 
Yannick Gingras

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


Gmane