[DDC-1163] entity persister gets superclasses' metadata for proxied subclass entity Created: 20/May/11 Updated: 05/Jun/11 Resolved: 05/Jun/11 |
|
| Status: | Resolved |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | 2.0.3, 2.0.4, 2.0.5 |
| Fix Version/s: | 2.0.6, 2.1 |
| Security Level: | All |
| Type: | Bug | Priority: | Critical |
| Reporter: | Stan Imbt | Assignee: | Benjamin Eberlei |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
PHP 5.3.6 on Debian Lenny & WinXP, PostgreSQL 8.4 & SQLite 3 |
||
| Attachments: |
|
| Description |
|
Using class table inheritance: When a proxy for a subclass-entity is registered at the unit of work and another entity, which references that entities' superclass, is added or removed, the employed entity persister gets/uses the superclasses' metadata. If the change-set of the referenced entity contains fields only defined in the subclass, the persister will create bogus SQL because it has no column names or data types: UPDATE table SET = ? WHERE id = ? The attached test case is stand-alone, creating an SQLite in-memory DB (sorry, I'm not familiar with your test suite). Only the path to Doctrine must be adapted at the top of 'run_test.php'. |
| Comments |
| Comment by Benjamin Eberlei [ 05/Jun/11 ] |
|
Verified on 2.0.5, interestingly this bug seems to have vanished in 2.1 / master. I will investigate whats wrong. |
| Comment by Benjamin Eberlei [ 05/Jun/11 ] |
|
Found the problem and fixed it. Very nasty timing error with inheritance and a false check. |