0 votes

Hi,
In Doctrine 2, the management of orphanRemoval in a Many to Many link is possible, but it is not possible to do it with Skipper or I did not find the entry point.
Do you have a solution ?

in Solved by (140 points)
recategorized by

Thanks for info. You're right that Skipper currently doesn't have orphanRemoval property for MN relations.

Can you please send me a link to Doctrine2 documentation where is orphanRemoval described for ManyToMany?

Thanks

I added the attribute directly in the Skipper config file (Doctrine2.skipper.cfg.xml) and it works perfectly. If you can add it in a future release it would be perfect for maintenance :)
For information, the documentation: https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/reference/working-with-associations.html#orphan-removal

yes, this is how Skipper XML configuration works ;-). For most common objects it's simple to add new elements.

Thanks for the link. This attribute will be added in next beta (I believe during today together with next updates we're working on).

Hi, I installed the last beta and the annotation orphanRemoval does not go to the right place, which generates an exception.
Normally, it should be added in the annotation @ORM\ManyToMany (), it is added in @ORM\JoinTable (either in joinColumns or in inverseJoinColumns).
I looked in the xml configuration and I can not add the annotation to the right place, so I leave it to you.
thank you in advance

thanks for info. it's fixed and will be released in next beta.

new beta is ready. please test it and let me know.

Please log in or register to answer this question.