eav-manager
eav-manager copied to clipboard
Many to Many not loaded
It seems that many to many relations are only loaded on one side : I have a Publication and an Author which are linked with a middle-entity PublishedPublications.
$publication->get('publishedPublications'); // return a collection with several elements
$authors->get('publishedPublications'); // return an empty collection
But when I call the finder :
$this->finder->findBy('PublishedPublication', [
'author' => $author,
]); // returns results
The same issue appears when saving entities. Entities are in the collection when using dump()
, but when saving, the EAV removes the relation.