]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- Query.with_polymorphic() now accepts a third
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 3 Dec 2008 21:27:04 +0000 (21:27 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 3 Dec 2008 21:27:04 +0000 (21:27 +0000)
commitfff9409a339d7a8d33667f5f717a3ae7ed334842
tree3c00330b4636376eeae1b170da62f9e7fd156629
parent0410eae36b36dc8ea7e747c4b81c7ec9de5f2da4
- Query.with_polymorphic() now accepts a third
argument "discriminator" which will replace
the value of mapper.polymorphic_on for that
query.  Mappers themselves no longer require
polymorphic_on to be set, even if the mapper
has a polymorphic_identity.   When not set,
the mapper will load non-polymorphically
by default. Together, these two features allow
a non-polymorphic concrete inheritance setup
to use polymorphic loading on a per-query basis,
since concrete setups are prone to many
issues when used polymorphically in all cases.
CHANGES
lib/sqlalchemy/orm/mapper.py
lib/sqlalchemy/orm/query.py
test/orm/inheritance/basic.py
test/orm/inheritance/concrete.py