This document will provide steps to reverse engineer POJO’s from Database tables for Hibernate mappings.
Step 1: Open Netbeans IDE and Create Project
(Click to enlarge image)


Step 2: Create Hibernate configuration file


Provide Database details with dialect


Click finish button and it will generate ‘hibernate.cfg.xml’ files.
Step 3: Using Hibernate reverse engineering Wizard create ‘hibernate.reveng.xml’ file


Click Next.

Select Database tables to generate DAO’s.

Click Finish button this will generate ‘hibernate.reveng.xml’ file

Step 5: Create POJO classes.

Option One: For HBM mapping file

Option Two: For Annotations

Click finish button and it will generate POJO (DAO beans) into provided package.
Ping me if you need any further help.
Step 1: Open Netbeans IDE and Create Project
(Click to enlarge image)


Step 2: Create Hibernate configuration file


Provide Database details with dialect


Click finish button and it will generate ‘hibernate.cfg.xml’ files.
Step 3: Using Hibernate reverse engineering Wizard create ‘hibernate.reveng.xml’ file


Click Next.

Select Database tables to generate DAO’s.

Click Finish button this will generate ‘hibernate.reveng.xml’ file

Step 5: Create POJO classes.

Option One: For HBM mapping file

Option Two: For Annotations

Click finish button and it will generate POJO (DAO beans) into provided package.
Ping me if you need any further help.
Comments
Post a Comment