I want to share my Models with some other projects, they use the same models but not the same field mappings and constraints. I wonder if there is way to extract annotations from models and use xml configuration instead ? Or other way to achieve this ?
NOTE : I'm using play 1.3
.
Last week I were analyzing something like that.
A way to archive this is:
orm.xml
files on META-INF
folder ( but not presistence.xml
). entityManager
using a persistence.xml
on META-INF
. For more information see the JPA spec , 6.2 Persistence Unit Packaging
Other references:
Good luck!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.