Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Private Ownership and Unique Constraints
Private Ownership and Unique Constraints [message #521543] Thu, 18 March 2010 00:21 Go to next message
Daniel Frank is currently offline Daniel Frank
Messages: 6
Registered: March 2010
Junior Member
Dears,

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,
Re: Private Ownership and Unique Constraints [message #521663 is a reply to message #521543] Thu, 18 March 2010 12:46 Go to previous messageGo to next message
Chris Delahunt is currently offline Chris Delahunt
Messages: 1023
Registered: July 2009
Senior Member
Hello,

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.

Best Regards,
Chris
Re: Private Ownership and Unique Constraints [message #521674 is a reply to message #521543] Thu, 18 March 2010 13:23 Go to previous messageGo to next message
Daniel Frank is currently offline Daniel Frank
Messages: 6
Registered: March 2010
Junior Member
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.
Re: Private Ownership and Unique Constraints [message #522185 is a reply to message #521543] Sat, 20 March 2010 23:02 Go to previous message
Daniel Frank is currently offline Daniel Frank
Messages: 6
Registered: March 2010
Junior Member
Quote:
Native EclipseLink API has a flag that can be used to process deletes first


What is the flag?
Previous Topic:Error Logging in to the database
Next Topic:Bug in DDL generation for Oracle
Goto Forum:
  


Current Time: Mon Sep 22 22:35:54 GMT 2014

Powered by FUDForum. Page generated in 0.01691 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software