We have a project that uses JPA/Hibernate on the server side, the mapped entity classes are in their own Library-Project and use Annotations to be mapped to the database. I want to use these classes in an Android-Project – is there any way to ignore the annotations within Android, to use these classes as standard POJOs?
Share
The compiler will not care as long as you have the jar with the JPA annotation classes in your classpath. And if a runtime instrumentation system (such as Hibernate) is not present, the annotations are just extra info that are there but not used. The only issue is insuring the inclusion of the JPA jar in your distribution.