![]() |
![]() |
|
This is the same test case from bug 2599, just converted to use the datanucleus packages. The A.java POJO and related schema are unchanged from the previous issue.
Further note -- for clarity, this affects FCO Sets as well as SCO Sets. (The test case uses an SCO but I ran into the issue using a Set<FCO>.)
JPOX is no longer developed
Andy,
Per my other comments, this is affecting DataNucleus 1.0.3. Sorry for the confusion -- the other version fields got copied in from the "clone issue" functionality and I wasn't able to edit them. Wes,
so if you have a problem with DataNucleus then you raise an issue (new issue) on DataNucleus (project NUCCORE) not on JPOX. JIRA has "resolved" and "closed" for a reason; you don't attempt to reopen old issues - they are closed and there as a permanent record of something being fixed in release XXX, and so alway appear in release notes. If some problem comes up at some later date that has some resemblance to something ancient then a new issue is the only logical option. Either way I've got plenty to be doing for the next 6 months so if you want such things urgently you're advised to investigate yourself. Classes org.datanucleus.sco.* are where to start. |
|||||||||||||||||||||||||||||||||||||||||||
CORE-2599and appears to be a regression.I can't edit the version data having cloned this (sorry if this is not the right way to go about it), but this is against the DataNucleus 1.0.3 release.
In summary, if you add duplicate elements to a persistent Set field, you will get a SQL duplicate key exception.
The workaround is to always check .contains() on the Set before doing an add() operation.
I'll upload the code from the original example converted to datanucleus packages.