Generating Hibernate entity classes from the database in eclipse

Source: Internet
Author: User

Why write this blog, because often have colleagues or netizens asked me Hiberante entity class generation problem. So the next time someone asks me if I can save a bunch of words, actually this is really very simple.

Now the application of hibernate in the project is more and more extensive. I started to study it after I started supporting annotation syntax from Hibernate. To be honest, the original hibernate generated a heap of XML files looked dizzy, still inferior to write their own SQL statements to the comfortable, so have been listening to friends and colleagues introduced, but they have been disdain to use it.

But now it's blessed. Hibernate is one of the most common implementations of JPA, and hiberante itself supports annotation syntax. Now you don't need to look at the XML maps of that heap. And Eclipse also provides the tools to generate entity class directly from the database. Since you can write less or do not write SQL statements that happy and for it. Cut the crap and start doing it.

Or start with the first step of our project, the new project. In general, we use Java to do Web projects are file->new->dynamic Web project, the following figure:

The dialog box for the new project appears as shown in the picture

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.