openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Donald Woods (JIRA)" <j...@apache.org>
Subject [jira] Updated: (OPENJPA-1058) Duplicate rows in DB when UniqueConstraint set
Date Mon, 16 Aug 2010 20:55:17 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-1058?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Donald Woods updated OPENJPA-1058:
----------------------------------

    Fix Version/s: 2.0.2
                   2.1.0
                       (was: 2.0.1)

> 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-M2
>         Environment: DB2
>            Reporter: B.J. Reed
>             Fix For: 2.0.2, 2.1.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.


Mime
View raw message