[Solved] orphanRemoval in ManyToMany

0 votes
asked Dec 18, 2018 in Solved by lcolie (140 points)
recategorized Mar 19, 2019 by ludek.vodicka

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 ?

commented Dec 18, 2018 by ludek.vodicka Skipper developer (140,450 points)

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

commented Dec 18, 2018 by lcolie (140 points)

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

commented Dec 18, 2018 by ludek.vodicka Skipper developer (140,450 points)

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).

commented Jan 2, 2019 by lcolie (140 points)

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

commented Jan 2, 2019 by ludek.vodicka Skipper developer (140,450 points)

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

commented Jan 2, 2019 by ludek.vodicka Skipper developer (140,450 points)

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

Please log in or register to answer this question.

...