Commit 051ae82
committed
Update sourceEntity when copying parent association mappings
When ORMMappedSuperClassSubscriber copies association mappings from
a parent mapped-superclass to a child entity, it must update the
sourceEntity to point to the concrete child class. Without this,
Doctrine's BasicEntityPersister generates incorrect SQL table aliases
for eager-loaded inverse one-to-one associations, because the alias
cache key uses the mapped-superclass name instead of the concrete
entity name.
This mirrors what Doctrine's own ClassMetadataFactory::addInheritedRelations()
does when processing inheritance.1 parent f067e01 commit 051ae82
1 file changed
Lines changed: 7 additions & 0 deletions
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
90 | 97 | | |
91 | 98 | | |
92 | 99 | | |
| |||
0 commit comments