JPA批注Android中 [英] JPA Annotations in Android
问题描述
我们有一个使用 JPA /休眠
在服务器端的一个项目,映射的实体类是在自己的图书馆项目和使用标注映射到数据库。
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.
我想在Android项目中使用这些类 -
I want to use these classes in an Android-Project -
有没有办法忽略在Android上的标注,使用这些类作为标准<大骨节病>的POJO 骨节病>?的
推荐答案
编译器不会在意,只要你有在类路径中的JPA注解类的jar。如果运行时仪表系统(如Hibernate)不是present,注释只是额外的信息是有,但没有使用。唯一的问题是保险列入JPA罐子在你的发行。
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.
这篇关于JPA批注Android中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!