Fixed
Details
Assignee
Lukasz AntoniakLukasz AntoniakReporter
Christian BauerChristian BauerFix versions
Priority
Minor
Details
Details
Assignee
Lukasz Antoniak
Lukasz AntoniakReporter
Christian Bauer
Christian BauerFix versions
Priority
Created December 3, 2011 at 4:40 AM
Updated May 29, 2013 at 5:34 PM
Resolved May 7, 2013 at 3:20 AM
JPA 2.0 spec says:
"The OrderBy annotation may be applied to an element collection. When OrderBy is applied to an element collection of basic type, the ordering will be by value of the basic objects and the property_or_field_name is not used."
Hibernate currently ignores @OrderBy on @ElementCollection on e.g. List<String>. The order of elements is as returned by the database, undefined. The question is what "by value of the basic objects" means. In-memory String comparison, etc.?
If it turns out "by value" means "whatever is returned by the database", this issue can be closed.