In my domain class, I have the following:
@OneToMany(fetch = FetchType.EAGER)
@OrderColumn(name = "SEQUENCE_NUM")
private Set<Category> childCategories;
In my orm.xml, I have:
<one-to-many name="childCategories"
target-entity="Category">
<join-table name="DCS_CAT_CHLDCAT">
<join-column name="CATEGORY_ID"
referenced-column-name="CATEGORY_ID"/>
<inverse-join-column name="CHILD_CAT_ID"
referenced-column-name="CATEGORY_ID"/>
</join-table>
</one-to-many>
The @OrderColumn annotation is JPA2 or OpenJPA-specific. There is no
extension mechanism for the orm.xml, so there's no way for me to specify
"order-column" in the orm.xml.
As the XML is supposed to override annotations at the field level, does
this mean that my @OrderColumn annotation is going to be ignored? Does
this mean that I have to put all the configuration for this field into
the annotations?