|
Steve Neal True that is one work around. The other is to specify the list index column which is not a Hibernate-specific annotation anymore (JPA offers a standardized one):
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@OrderColumn(...)
private List<Child> children = new ArrayList<Child>();
The trouble here is the distinction between a List (true List behavior, persistent ordering) versus what Hibernate terms a bag. Specifying the OrderColumn (the "list index" column) makes this a true List
|