On our Java EE course test we had a question, which I am not sure how to answer:
In JPA, if we map with annotations AND XML, which has a higher priority?
From what I see in Mixing JPA annotations and XML configuration it is probably possible (even though not advisable), but this one is focused on hibernate, so it does not cover the possible answer, that it depends on the ORM tool implementing JPA being used.
Could you provide some insight to this (with sources, if any)?
XML overrides annotations for JPA. The overriding is at the field/property level.
Section 12.1.2 XML Overriding Rules of the JPA 2.0 (JSR-317) specification:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With