I have a problem using @PrivateOwned (or the new orphanRemoval) because the framework insert before remove
the orphans.
There is a way to change the order?
Thanks in advance,
Native EclipseLink API has a flag that can be used to process deletes first, but I do not believe it will help with privately owned relationships, as they are deleted as they are found in the update/insert stage. Can you describe the problem you are having a bit more and what you are trying to do and someone might be able to come up with a fix or workaround.
Hello,
Look this scenario, i have a entity Contact with a list of Telephone entity(id, number, type) and number has a unique key. If i remove a telephone (e.g number=0000, type=mobile) and add other telephone (number=0000, type=personal), i will have a unique constraint violation when i persist the contact, because eclipselink will add new telephone before remove the oldest.