To my knowledge, @OrderColumn is exclusively used for List. Not sure it will apply in the case of SortedSet, though. In case of the exception, it seems to have nothing to do with @OrderColumn, though. You need to specify either OrderBy or SortBy to help Hibernate to figure out how to go about ORM. Another option is to rely on natural ordering, but it seems the class doesn’t implement Comparable interface. But there is an obvious bug for sure. The error message should be A sorted collection must define an ordering or sorting`, not A sorted collection must define and ordering or sorting`. There is a typo there, . |