|
If we are using xml file (like orm.xml) to define default JPA EntityListener the hibernate configuration prefers JPAOverriddenAnnotationReader over JavaAnnotationReader and JPAOverriddenAnnotationReader doesn't process @Convert and @ForeignKey annotations and doesn't include it in the resulting annotations map. All conversions become skipped except autoApply ones in result. Test case included - if you comment <property name="mappingResources" value="orm.xml"/> line in test.xml configuration the test will run just fine. I suppose JPAOverriddenAnnotationReader should not process @Convert annotations at all (don't put it in the annotationToXml map).
|