Skip to content

Commit

Permalink
update user guide regarding the new feature of @SortNatural by default
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanQingyangXu authored and dreab8 committed Apr 14, 2020
1 parent 7e571cc commit c23ded5
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -502,7 +502,7 @@ According to the `SortedSet` contract, all elements must implement the `Comparab
[[collections-unidirectional-sorted-set]]
===== Unidirectional sorted sets

A `SortedSet` that relies on the natural sorting order given by the child element `Comparable` implementation logic must be annotated with the `@SortNatural` Hibernate annotation.
A `SortedSet` that relies on the natural sorting order given by the child element `Comparable` implementation logic might be annotated with the `@SortNatural` Hibernate annotation.

[[collections-unidirectional-sorted-set-natural-comparator-example]]
.Unidirectional natural sorted set
Expand Down Expand Up @@ -542,6 +542,12 @@ include::{sourcedir}/UnidirectionalComparatorSortedSetTest.java[lines=75..77,ind
----
====

[NOTE]
====
Before v6, `@SortNatural` must be used if collection element's natural ordering is relied upon for sorting.
Starting from v6, we can omit `@SortNatural` as it will take effect by default.
====

[[collections-map]]
==== Maps

Expand Down

0 comments on commit c23ded5

Please sign in to comment.