@OrderBy on @ElementCollection of basic type should "order by value"

Description

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.

Activity

Show:

Brett Meyer May 7, 2013 at 2:26 AM

Thanks to for the pull request!

Adam Pierzchała April 14, 2013 at 8:33 AM

Is there a chance of this getting fixed any time soon? It has been over a year now since this issue has been created and not even a single comment here.

Fixed

Details

Assignee

Reporter

Fix 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