Bug 1103546 - NonUniqueException when updating a content spec
Summary: NonUniqueException when updating a content spec
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: PressGang CCMS
Classification: Community
Component: CCMS-Core
Version: 1.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 1.7
Assignee: Lee Newson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1092170
TreeView+ depends on / blocked
 
Reported: 2014-06-01 23:49 UTC by Matthew Casperson
Modified: 2014-08-04 22:28 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-06-22 21:32:39 UTC
Embargoed:


Attachments (Terms of Use)

Comment 4 Lee Newson 2014-06-02 07:15:08 UTC
Fixed in 1.7-SNAPSHOT build 201406021653

There was two parts to this issue:

The first was a bug in envers that was causing the audit events to be retained when a rollback occurred which means using the same entity manager twice would mean that the events would be persisted when they shouldn't have been. This was the cause for the NonUniqueException.

The second was the way that info nodes were being updated. The deleted node wasn't getting removed which meant that it was trying to set the removed/changed info nodes ContentSpecNodeID to null. This was the cause of the foreign key exception.

Note: This version has been deployed to the test/development server.

Comment 5 Lee Newson 2014-06-02 07:17:44 UTC
For the envers bug it was fixed in hibernate 4.2.1.Final. Since this isn't available in AS7 or until EAP 6.2 we've implemented a workaround which is to make sure that we don't reuse the same entity manager twice.

Comment 6 Matthew Casperson 2014-06-16 21:12:43 UTC
Reran the curl commands and the resulting spec was editable in the UI.


Note You need to log in before you can comment on or make changes to this bug.