Consists of Hibernate CRUD features and advanced mappings with examples.
- Simple CRUD with no entity mapping.
- One to One mapping.
- One to Many Uni-directional.
- One to Many Bi-directional.
- Many to Many mapping.
- Eager and Lazy Fetch types.
- Java - JDK 1.8 or above
- STS/Eclipse
- MySQL Workbench
- Check out the source code.
- Open STS or Eclipse.
- Import individual examples.
- Open MySQL Workbench use the scripts available in Hibernate libraries and DB scripts/database-scripts folder to create tables for respected examples.
- Add the Hibernate and SQL jars to build path which are present in Hibernate libraries and DB scripts/lib folder.
- Update hibernate.cfg.xml with your database URL, username and password use can use TestJdbc.java class to test your DB connection.
- Goto Main classes in examples then run as Java Application.
- Check the output in console and observe the manipulation in respected DB tables.