|
Re: Duplicate key error only if classes are woven [message #720531 is a reply to message #719050] |
Tue, 30 August 2011 19:11 |
|
There was an issue in EclipseLink that when change tracking is used, and calling add() on a lazy Set that had never been accessed, it would always try to add to the database, even if already contained in the Set.
I think this was fixed in the latest release. So try the latest release, or log a bug (should already be a bug, so if you find it vote for it).
The workaround is to just disable weaving of change tracking (or weaving entirely).
"eclipselink.weaving.changetracking"="false"
Or you can disable change tracking for just the one descriptor using @ChangeTracking.
Or you could ensure you access the Set first before the add(), by calling contains() first.
James : Wiki : Book : Blog : Twitter
|
|
|
Powered by
FUDForum. Page generated in 0.01638 seconds