Change-Id: Iaacab5d2fe45b0b87fea922ec914e258dba9e30d
s.query(Employee).options(
selectin_polymorphic(Employee, [manager_poly])).all()
+.. _inheritance_of_type:
Referring to specific subtypes on relationships
-----------------------------------------------
:param \class_: a class or mapper indicating that criterion will be
against this specific subclass.
+ .. seealso::
+
+ :ref:`inheritance_of_type`
"""
return pj
def of_type(self, cls):
- """Produce a construct that represents a particular 'subtype' of
- attribute for the parent class.
+ r"""Redefine this object in terms of a polymorphic subclass.
- Currently this is usable in conjunction with :meth:`.Query.join`
- and :meth:`.Query.outerjoin`.
+ See :meth:`.PropComparator.of_type` for an example.
"""
return RelationshipProperty.Comparator(