Skip to content

Loading…

DDC-1163: entity persister gets superclasses' metadata for proxied subclass entity #1765

Closed
doctrinebot opened this Issue · 3 comments

2 participants

@doctrinebot

Jira issue originally created by user literal:

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'.
The file 'SubclassPropertyBugTest.php' also contains a more detailed description.

@doctrinebot

Comment created by @beberlei:

Verified on 2.0.5, interestingly this bug seems to have vanished in 2.1 / master. I will investigate whats wrong.

@doctrinebot

Comment created by @beberlei:

Found the problem and fixed it. Very nasty timing error with inheritance and a false check.

@doctrinebot

Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.0.6 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.