add with_polymorphic() to query

Issue #974 resolved
Mike Bayer repo owner created an issue

this will create joins along polymorphic paths. if select_table is enabled on the mapper, then its ignored.

session.query(Person).with_polymorphic(Engineer).with_polymorphic(Manager).filter(....)

add it to join() also...sigh

session.query(Company).join([Engineer), Engineer.computers](('employees',))

session.query(Company).join([(Engineer, Manager))](('employees',)).filter(or_(Engineer.., Manager...))

Comments (2)

  1. Log in to comment