Skip to content

manojnanjundaswamy/Hibernate

Repository files navigation

Basic Hibernate

Consists of Hibernate CRUD features and advanced mappings with examples.

Examples includes

  • 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.

Prerequisites

  • Java - JDK 1.8 or above
  • STS/Eclipse
  • MySQL Workbench

Running the examples

  • 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.

About

This repo contains examples of hibernate CRUD features and advanced mappings

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages