When I try to save an Entity linked with a many to many relation with the Media Entity of Sonata i get the error: Entity Was not configured to cascade persist
I have created the Entity class between the two tables, named EntityMedias.
Now I have Entity -1----N- EntityMedias -N----1- Media
And the annotations are set in the EntityMedias two manytoone relations, one related to Entity and the other one related to Media.
How can I configure the Entity with cascade Persist? I have tried to add the option cascade=persist to the column notation, but it doesn't work.
In EntityAdmin I used sonata_type_collection to show the $entityMedias relation inside the Entity.
All work fine if I don't add any media to the new Entity.
Any help will be apreciated
Thank you!