Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 73011 invoked from network); 1 May 2009 14:36:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 May 2009 14:36:51 -0000 Received: (qmail 95641 invoked by uid 500); 1 May 2009 14:36:51 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 95603 invoked by uid 500); 1 May 2009 14:36:51 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 95484 invoked by uid 99); 1 May 2009 14:36:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2009 14:36:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2009 14:36:50 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7299F234C04B for ; Fri, 1 May 2009 07:36:30 -0700 (PDT) Message-ID: <860624345.1241188590467.JavaMail.jira@brutus> Date: Fri, 1 May 2009 07:36:30 -0700 (PDT) From: "B.J. Reed (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Updated: (OPENJPA-1058) Duplicate rows in DB when UniqueConstraint set In-Reply-To: <23896140.1241188590333.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ 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.