OpenJPA. Look at this code, this is the best way to understand
//This is in the parent table @OneToMany(cascade = CascadeType.ALL, mappedBy = "parentTable", fetch = FetchType.EAGER) @OrderColumn private ArrayList<child_class_type> childTable = new ArrayList<child_class_type>(); //This is in the child table @ManyToOne(fetch = FetchType.EAGER, optional = false) private parentTableClass parentTable;
This will get an ordered list (child table). :)
John W., Col
John velandia
source share