diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-12-16 15:25:48 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-12-16 15:25:48 -0500 |
| commit | 1d9eb4101365e2c7b8d434fae403aa876ccbef59 (patch) | |
| tree | bc2d9cfc7380d9c53e76c182811ec5b5d59e81bf /lib/sqlalchemy/orm | |
| parent | 015e804c4889cac8a0423168ec7036fb5f42fea0 (diff) | |
| download | sqlalchemy-1d9eb4101365e2c7b8d434fae403aa876ccbef59.tar.gz | |
- Fixed bug when using joined table inheritance from a table to a
select/alias on the base, where the PK columns were also not same
named; the persistence system would fail to copy primary key values
from the base table to the inherited table upon INSERT.
[ticket:2885]
Diffstat (limited to 'lib/sqlalchemy/orm')
| -rw-r--r-- | lib/sqlalchemy/orm/mapper.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/mapper.py b/lib/sqlalchemy/orm/mapper.py index b3b872f38..2d354de54 100644 --- a/lib/sqlalchemy/orm/mapper.py +++ b/lib/sqlalchemy/orm/mapper.py @@ -2488,7 +2488,9 @@ class Mapper(_InspectionAttr): for m in self.iterate_to_root(): if m._inherits_equated_pairs and \ cols.intersection( - [l for l, r in m._inherits_equated_pairs]): + util.reduce(set.union, + [l.proxy_set for l, r in m._inherits_equated_pairs]) + ): result[table].append((m, m._inherits_equated_pairs)) return result |
