mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
SINGLE_TABLE Inheritance breaks with optional ManyToOne relationship in subclass #5636
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @GDIBass on GitHub (Aug 12, 2017).
Originally assigned to: @GDIBass on GitHub.
When using single table inheritance with an optional ManyToOne relationship the referenced entity is loaded with no data whatsoever. You have to reload the entity from the database in order to get it to load any of the appropriate data. Here is a repository link with a working example:
https://bitbucket.org/GDIBass/relationalsingletableinheritancedoctrinebug/overview
@lcobucci commented on GitHub (Aug 13, 2017):
@GDIBass thank you for submitting this issue with that working example but it would be far more helpful if you could send us a PR with a failing test case. This isolates everything and makes it easier to solve the problem.
You can find examples on
388afb46d0/tests/Doctrine/Tests/ORM/Functional/Ticket.@GDIBass commented on GitHub (Aug 13, 2017):
@lcobucci Will do. Should I name mine GH6622?
@GDIBass commented on GitHub (Aug 14, 2017):
I can't get it to replicate with the tests. Perhaps it's something with Symfony? I'll get something on Stack Exchange
@Ocramius commented on GitHub (Aug 14, 2017):
@GDIBass closing here - please re-open once reproduced only with the ORM.
@Ocramius commented on GitHub (Aug 14, 2017):
Check also https://github.com/doctrine/doctrine2/pull/1194 meanwhile