Open renatogcarvalho opened 6 years ago
Hello folks,
Any thoughts on how we can hydrate an Entity even though it's using the Joined inheritance type in Doctrine?
+1 It seems to be messed up
For now joined inheritance doesn't works with DoctrineReadOnlyHydrator, as it's based on Doctrine array hydrator who have a lot of problems with it.
I don't think i will try to fix it, cause to do that, i have to not use Doctrine array hydrator. And it's pretty hard to create an hydrator from scratch.
It looks like the Hydration doesn't work for Entities modeled on a Class Table inheritance relationship: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/inheritance-mapping.html#class-table-inheritance.
Both SimpleObjectHydrator and ReadOnlyHydrator do not work.
Example below:
Repository method (just as an example):
Dump after query:
Any thoughts?
Best Regards,
Renato.