Bug 1116705
Summary: | Unable to alter saved search filter fields | ||
---|---|---|---|
Product: | [Community] PressGang CCMS | Reporter: | Lee Newson <lnewson> |
Component: | Web-UI | Assignee: | Lee Newson <lnewson> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 1.7 | CC: | cbredesen |
Target Milestone: | --- | ||
Target Release: | 1.9 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-09-01 01:20:34 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Lee Newson
2014-07-07 06:00:03 UTC
The problem looks to be the order that hibernate executes the statements. It will always do inserts before deletes, see: http://stackoverflow.com/a/22861675/1330640 http://imjigar.wordpress.com/2009/06/24/hibernate-order-of-execution/ Looks like you can't make MySQL/MariaDB do deferred constraint checks either (see http://dev.mysql.com/doc/refman/5.5/en/innodb-foreign-key-constraints.html). As such we'll likely need to reorder how REST updates are done so that delete statements are done, flushed and then the rest of the content is inserted/updated. Fixed in 1.9-SNAPSHOT build 201407291548 The core way rest entities were synced with database entities has been re-written so that it is done in stages based on the required action. This allows us to do the deletes first, flush the changes and then do the create/update operations. As such the way it works now is: 1. Collect any change information. 2. Perform the deletions on the children entities, if there are any. 3. Flush the deletions. 4. Create any new entities, syncing only the base information. 5. Update any information and perform the additional sync processing (ie XML formatting) Note: This version has been deployed to the development/test server. Note 2: These changes haven't been merged with devel and are currently in the BZ#1116705 branch. Created a filter, populated all the fields, saved it, loaded it again, edited or deleted all the field and saved again ok. I also tested adding and removing values and relationships in entities like topics, content specs, images, files, property tags, property tag categories, tags, projects and categories. There were two bugs that I found. They are probably not related to this, but I'll list there here anyway: BZ#1124578 BZ#1124577 In any case the original bug is verified. *** Bug 1124577 has been marked as a duplicate of this bug. *** Moving back to ASSIGNED because of BZ#1124577 *** Bug 1124578 has been marked as a duplicate of this bug. *** Fixed the above two issues in 1.9-SNAPSHOT build 201407300910 since they were caused by this change. Note: This version is currently live on the test/development server. Verified that I can now add and remove tags from categories without any errors. Merged the changes into the devel branch. |