javamysqlspringhibernatereverse-engineering

How to use Hibernate reverse engineering to create annotatedClasses style?


Using Hibernate reverse engineering creates mappingResources style, but I need annotatedClasses.

Anyway to make "Hibernate reverse engineering" to make the code annotatedClasses style and not mappingResources style?

I am trying to take a large MySQL database and make Java classes annotated in them.

Please let me know if anyone has done this.


Solution

  • You can achieve that with Hibernate Tools, an Eclipse plugin.

    Take a look at this tutorial. Every steps are explains. When you are generating the .java files, you can choose between xml file and JPA annotations.

    To generate annotations, check Generate EJB3 annotations and Use Java 5 syntax

    enter image description here