Transform .HBM model to annotated pojos
-
02-07-2019 - |
Question
We have our domain model declared in rusty old hbm files, we wish to move to POJOs annotated with the javax.persistence.* annotations.
Has anyone had experience doing so?
Are there tools that we could employ?
Solution
You could use hbm2java ant task from hibernate-tools.jar. This is a tool known as Hibernate Tool. hbm2java will generate JPA annotated POJOS from hbm files.
See http://www.hibernate.org/hib_docs/tools/reference/en/html/ant.html
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow