Skip to content

Commit

Permalink
OGM-1538 Put back reference to @orderby in the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
fax4ever authored and DavideD committed Dec 2, 2018
1 parent 55266b2 commit 1ece625
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions documentation/manual/src/main/asciidoc/modules/mapping.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,16 @@ as it is more similar to a document store.
Hibernate OGM, by default, does not guarantee that elements in an association will
be retrieved in the same order each time you load the association from the datastore.

If the order is important, you can enforce it using the annotation
`@javax.persistence.OrderColumn`:
it defines a field to keep track of the position
of each element in the association.
If the order is important, you can enforce it using the following annotations:

* `@javax.persistence.OrderColumn`: the collection uses a dedicated order column
in the collection link table

* `@javax.persistence.OrderBy`: the collection is ordered upon retrieval using
a child entity property

You can find more details and examples in the
http://docs.jboss.org/hibernate/orm/5.3/userguide/html_single/Hibernate_User_Guide.html#collections-list[Hibernate ORM documentation].

[WARNING]
====
Expand Down

0 comments on commit 1ece625

Please sign in to comment.