Hibernate version: hibernate-3.0beta3, hibernate-annotations-3.0alpha2
I'm using annotations and have defined the following ManyToMany relationship which is working fine. The question that I have is, is there a way that I can specify the sort order for the Item collection using an annotation? I'm pretty sure you can do this using the XML configuration file way of doing things, not sure about annotations...
Code:
@ManyToMany(fetch=FetchType.LAZY)
@AssociationTable(table=@Table(name="ReservationItem"),
joinColumns={@JoinColumn(name="reservationId")},
inverseJoinColumns={@JoinColumn(name="itemId")}
)
public Collection<Item> getItems() {
return items;
}