On 6/2/15 12:30 PM, g wrote:
Hi all
Is there a way to get the "classname" of thepolymorphic class result in a
single query on the base class ?
soemthing like this
well that's lookup / conditional logic, I'd just do it as an in-Python
filter on the results you get:
for result in query:
Hi all
Is there a way to get the "classname" of the polymorphic class result in a
single query on the base class ?
soemthing like this
session.query(cast(Employee.__mapper__.polymorphic_map[Employee.type].class_.__name__,
String)).filter(Employee.name=='Employee_Name').one()
*Details *