]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- joined-table inheritance will now generate the primary key
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 23 Jul 2007 22:20:44 +0000 (22:20 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 23 Jul 2007 22:20:44 +0000 (22:20 +0000)
commit5130d25fd144f7434a49a5fa7000b468bbd939c2
tree1c24c8fb8fd372b8c7e648bcfe23a11aeb276688
parent47f36041de46755c0485d46f73903e706ec5a51c
- joined-table inheritance will now generate the primary key
columns of all inherited classes against the root table of the
join only.  This implies that each row in the root table is distinct
to a single instance.  If for some rare reason this is not desireable,
explicit primary_key settings on individual mappers will override it.

- When "polymorphic" flags are used with joined-table or single-table
inheritance, all identity keys are generated against the root class
of the inheritance hierarchy; this allows query.get() to work
polymorphically using the same caching semantics as a non-polymorphic get.
note that this currently does not work with concrete inheritance.
CHANGES
examples/polymorph/concrete.py
examples/polymorph/single.py
lib/sqlalchemy/orm/mapper.py
lib/sqlalchemy/sql_util.py
test/orm/inheritance/basic.py
test/orm/inheritance/concrete.py