Red Hat Bugzilla – Bug 641045
ordering of elements in a property list is not persisted correctly
Last modified: 2014-06-27 17:03:22 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.
We have an @OrderBy which should order things by primary key/chronologically.