You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by smunro <st...@gmail.com> on 2017/06/08 10:01:19 UTC

Aries JPA annotationless mappings

Hello,

I have another small obstacle regarding a requirement for avoiding
annotations :(

I have a bundle which contains model classes, but I'm not allowed to use
annotations as they are to be left agnostic. The obviously way round this is
to go back to the old mappings.xml.  I have an orm.xml in my META-INF, which
karaf picks up ok, but I am getting the following error:

  org.hibernate.AnnotationException: No identifier specified for entity:
<blah>

I have an <id> attribute in my orm.xml file, so I'm guessing the .xml file
is being ignored. 

The only other option I can see round this is to wrap each model with an
annotated equivalent, but I'd like to try and cut the amount of code needed.
Is there an approach to disable annotations and ensure the mapping.xml is
the only source used?

I remember reading something about aries jpa2 always needing annotations,
but I can't find that comment anymore, so I dunno if it's still valid.

Stephen



--
View this message in context: http://karaf.922171.n3.nabble.com/Aries-JPA-annotationless-mappings-tp4050610.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Aries JPA annotationless mappings

Posted by smunro <st...@gmail.com>.
I came across this: https://issues.apache.org/jira/browse/ARIES-1711, so I
guess I need to create those wrappers :)



--
View this message in context: http://karaf.922171.n3.nabble.com/Aries-JPA-annotationless-mappings-tp4050610p4050611.html
Sent from the Karaf - User mailing list archive at Nabble.com.