I have a JPA entity class which is configured entirely from orm.xml (no annotations). One of the properties of the entity class is a String which is converted to a plain String representation on the database side via a javax.persistence.AttributeConverter<String, String> implementation. I'd like to generate the metamodel information for the entity using org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor or similar.
However, JPAMetaModelEntityProcessor seems to ignore the conversion defined in orm.xml as it throws the following error (see attached test case):
— maven-processor-plugin:2.2.4rocess (process) @ ConverterTest —
diagnostic: warning: Unable to determine type for property tags of class test.convertertest.Post using access type FIELD
The configuration works fine if I use annotations instead of orm.xml, so I'm assuming the processor isn't able to determine the conversion types from the class generics. However, I'm not able to find any other way of explicitly defining these.
Note that the processor also runs fine (with expected outputs) if the array attribute is omitted.
I've tried replacing String with List<String> in the entity and converter, in which case the processor completes without issue but generates uncompilable code:
Is this an undocumented bug/limitation, or am I missing a specification somewhere?
Thanks in advance!
JavaSE 1.8, Hibernate 5.4.1.Final