Is there any difference if I use
@OneToMany
public Set ratings;
or if I use
@OneToMany
public List
If you use a List, then you can specify an 'Order BY' clause in getter function. You can't do that with a Set. The order by clause can contain partial EJBQL; For example
@OneToMany
@OrderBy("lastname ASC")
public List ratings;
If you leave this field blank, then the list is sorted in ascending order based on the value of the primary key.