Bug 641045 - ordering of elements in a property list is not persisted correctly
Summary: ordering of elements in a property list is not persisted correctly
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Configuration
Version: 4.0.0
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-10-07 16:22 UTC by Joseph Marques
Modified: 2014-06-27 21:03 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-27 21:03:22 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 806477 0 medium NEW RFE: Review use of OrderBy annotations in the domain model 2022-03-31 04:27:56 UTC

Internal Links: 806477

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.


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