I'm trying to optimize one of my QueryObjects to not load related entities separately one by one. Usually this is possible using postFetch method. However I've run into a case where the related entities are already loaded when postFetch is called.
After some debugging I found out that the reason is this: https://github.com/…itOfWork.php#…
Which didn't give me any hint as to how to fix this or refactor my entities.
Do you have any tips what can be done in this case?
EDIT: Maybe I should add some info what the relation is about. I have an entity called Demand with ManyToOne relation to Client. Client is abstract with child classes Company and Person.