Myeclips Reverse Engineering

Source: Internet
Author: User

Software Version: mydomains6.5

Database: Oracle

 

Step 1: Create a database and a table

Use plsqldev to log on with system. Right-click the user to create a user and specify a role, as shown in figure 2 below.

Log On with the user name and password. Here we use a demo to create your own table.

Step 2: connect myeclips to the Oracle database.

Window --> open perspective --> myeclipse Java persistence
After the operation, a view dB Brower is displayed, right-click to create:

Finish,

 

Step 3: 
Create a WEB Project
Right-click the project and choose --> myeclipse --> Add hibernate capabilities.
If you need to add comments to the object class, select the next enable hibernate annotations support (many enterprises use annotations)

Next, select a directory to store the automatically generated hibernate. cfg. xml file, which is usually stored in the SRC root directory without exception.

Next, select the created dB DRIVER:

Next, select a directory to store the automatically generated hibernatesessionfactory tool class (this can be canceled or not)

Finish, this hibernatesessionfactory tool class is a session Singleton, there are some other methods to close the session.

Step 4: reverse generate entity classes
Find the table to be reversed in dB Brower and right click ---> hibernate reverse enginnering

Option:

Java SRC folder source code package

Java package -- stores the entity classes to be reversed, and selects the directory (created by yourself ):

Generate non-annotation form:

Click Finish.

Annotation form:

Select the Add hibernate mapping annotations to pojo option below. If you do not care about the other options, this option is used to "add the ing annotation to the pojo object ".

Next, see

Type Mapping should be selected with hibernatetypes, so these annotations are from javax. Persistence .*.

Id generator: You can see from the drop-down list that the ID generation policy is configured.

Enable indicates the discovery of ection)

The next step is the default:

Finish.

 

 

 

 

 

 

 

 

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.