My problem : i have a class table inheritance, with only 3 class, one abstract and two concrete.
says AbstractClass, ConcretClassA and ConcreteClassB
All three are declared with @entity
if i already have in my identity map the ConcretClassA with id = 1
when i do an entityManager->find('ConcreteClassB', 1) the identityMap returns me the ConcretClassA with id = 1
that's not correct !
it should return a null value instead
That's because the entityRepository (and all the other doctrine class) call the UnitOfWork tryGetById with the rootEntityName, which in my case is AbstractClass.
See the first line of the entityRepository's find method :
if i change this line to :
the find method return the expected null value.
So, why the UnitOfWork tryGetById method is always called with the rootEntityName ?