Hibernate – One-to-Many example (Annotation)

In this tutorial, it will reuse the entire infrastructure of the previous “Hibernate one to many relationship example – XML mapping” tutorial, enhance it to support Hibernate / JPA annotation. Project Structure Review the new project structure of this tutorial. Note Since Hibernate 3.6, annotation codes are merged into the Hibernate core module, so, the …

Read more

Hibernate – One-to-Many example (XML Mapping)

A one-to-many relationship occurs when one entity is related to many occurrences in another entity. In this tutorial, we show you how to works with one-to-many table relationship in Hibernate, via XML mapping file (hbm). Tools and technologies used in this tutorials : Hibernate 3.6.3.Final MySQL 5.1.15 Maven 3.0.3 Eclipse 3.6 Project Structure Project structure …

Read more