Bug 641045 - ordering of elements in a property list is not persisted correctly
ordering of elements in a property list is not persisted correctly
Product: RHQ Project
Classification: Other
Component: Configuration (Show other bugs)
All Linux
low Severity medium (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
Depends On:
  Show dependency treegraph
Reported: 2010-10-07 12:22 EDT by Joseph Marques
Modified: 2014-06-27 17:03 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-06-27 17:03:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Joseph Marques 2010-10-07 12:22:15 EDT
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 17:03:22 EDT
We have an @OrderBy which should order things by primary key/chronologically.

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