openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Dick (JIRA)" <>
Subject [jira] Updated: (OPENJPA-1058) Duplicate rows in DB when UniqueConstraint set
Date Mon, 22 Mar 2010 17:53:27 GMT


Michael Dick updated OPENJPA-1058:

    Fix Version/s:     (was: 2.0.0)

Targeting for 2.0.1 

> Duplicate rows in DB when UniqueConstraint set
> ----------------------------------------------
>                 Key: OPENJPA-1058
>                 URL:
>             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.1
>         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

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message