You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "B.J. Reed (JIRA)" <ji...@apache.org> on 2009/05/01 16:36:30 UTC
[jira] Updated: (OPENJPA-1058) Duplicate rows in DB when
UniqueConstraint set
[ https://issues.apache.org/jira/browse/OPENJPA-1058?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
B.J. Reed updated OPENJPA-1058:
-------------------------------
Attachment: DupRowsInDB.ZIP
> Duplicate rows in DB when UniqueConstraint set
> ----------------------------------------------
>
> Key: OPENJPA-1058
> URL: https://issues.apache.org/jira/browse/OPENJPA-1058
> Project: OpenJPA
> Issue Type: Bug
> Components: jdbc
> Affects Versions: 1.2.1, 2.0.0
> Environment: DB2
> Reporter: B.J. Reed
> Fix For: 2.0.0
>
> Attachments: DupRowsInDB.ZIP
>
>
> WebUser entity has a HashMap of WebUserPreferences.
> WebUserPreference has a UniqueConstraint defined on 2 fields.
> Can reproduce in DB2 DB with attached DDL.
> Basically, what is happening is, that the test case goes through and adds 4 WebUserPreferences to the WebUser. Then persists the WebUser. Then adds 4 more WebUserPreferences to the same WebUser, same name and web user (constraint columns). The Entity is then merged. The WebUser Entity has the correct 4 WebUserPreferences, but the database has all 8 rows. Was expecting to see the first 4 rows be removed from the database (or maybe they should have been updated with the more recent value data).
> Also, even if the second set of values are the same as the first set of values, then there are still 8 rows in the database, the 4 original rows and the second set of duplicate rows.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.