You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not sure it is an issue, but I'd like to discuss it with you.
In my application I have an OrderItem with a ManyToOne Relation with another Entity called Child.
An OrderItem can have 0 or 1 child defined.
Now, in my orderRepository, I want to get OrderItems with child and its parent data, so I tried this way :
But as concernedChild may be null I get an exception for this line of AssociationHydrator : $subjects = array_map([$this->entityManager->getUnitOfWork(), 'getEntityIdentifier'], $subjects);
I managed to get it work by adding a simple filter on the $subjects array like this :
Hello,
I am not sure it is an issue, but I'd like to discuss it with you.
In my application I have an OrderItem with a ManyToOne Relation with another Entity called Child.
An OrderItem can have 0 or 1 child defined.
Now, in my orderRepository, I want to get OrderItems with child and its parent data, so I tried this way :
But as concernedChild may be null I get an exception for this line of AssociationHydrator :
$subjects = array_map([$this->entityManager->getUnitOfWork(), 'getEntityIdentifier'], $subjects);
I managed to get it work by adding a simple filter on the $subjects array like this :
What do you think ? is it normal that I get an Exception ? and is my solution valuable ?
Thanks !
The text was updated successfully, but these errors were encountered: