Reputation: 109
I have to develop a java web application. For persistence, I am going to use hibernate. I am a symfony2 developer and I like generating my entities using Doctrine 2 console. So is there a similar tool for hibernate (or other well known Java ORM) that generates entities automatically ?
Upvotes: 2
Views: 4026
Reputation: 61588
AFAIK, no, there are no entity generators on par with the ones in doctrine or rails.
However generating entities from existing tables can still be quite comfortable if you use eclipse. Take a look at this help page . The page itself is a bit outdated, but the functionality is still there. The menus will guide you nicely through property and relation mapping.
Other IDEs like IntelliJ and NetBeans probably have similar tools, but I am not familiar enough with them to advise.
Upvotes: 2
Reputation: 16158
You can use hibernate reverse engineering tool(Hibernate Tool) to generate Entity classes. What you need to do is to provide session factory configuration(it takes your hibernate.cfg.xml) and database schema.
Upvotes: 2