Bug 641045

Summary: ordering of elements in a property list is not persisted correctly
Product: [Other] RHQ Project Reporter: Joseph Marques <jmarques>
Component: ConfigurationAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: low    
Version: 4.0.0CC: ccrouch, jshaughn
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-27 21:03:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joseph Marques 2010-10-07 16:22:15 UTC
Currently, @IndexColumn(name = "list_index") is commented out of PropertyList.  A quick look in the database will confirm that list_index is null for all properties.  Hibernate docs say that collections w/o @OrderBy/@IndexColumn are going to be considered bags, which explaining why ordering is lost between views.  We need to do the necessary testing to at list_index back, so that lists are properly stored and retrieved.  Might want to add a hook to the configuration manager bean to give property lists a default ordering if none is found after retrieving from the DB.  Likewise, it might be necessary to add checks upon persist to ensure list_index values make sense for a given property list.

Comment 2 Jay Shaughnessy 2014-06-27 21:03:22 UTC
We have an @OrderBy which should order things by primary key/chronologically.