How to Program with Java Podcast

Hibernate @OneToOne Unidirectional / Bidirectional


Listen Later

One-to-One Unidirectional Relationship

Since you’ve already learned about the ins and outs of how unidirectional one-to-many and bidirectional one-to-many relationships work, it’s time to learn about the One-to-One relationships.

We will start things off with the unidirectional One-to-One relationship and how it’s set up in Hibernate.

First thing is first, you need to understand how a One-to-One relationship is actually set up in a database. Once you understand that the child table declares the parent’s primary key as the child’s primary key, then we can get moving with the Hibernate stuff!

For this example, we are going to use the One-to-One relationship between an Employee and their Address. TheAddress table will be set up as follows:

For more information, please read the show notes via http://howtoprogramwithjava.com/session55

...more
View all episodesView all episodes
Download on the App Store

How to Program with Java PodcastBy Trevor Page: Java Guru | Programmer | Teacher

  • 4.8
  • 4.8
  • 4.8
  • 4.8
  • 4.8

4.8

94 ratings


More shows like How to Program with Java Podcast

View all
Inside Java by Chad Arimura, David Delabassee

Inside Java

26 Listeners

The Java Easily Podcast by Matt Speake

The Java Easily Podcast

10 Listeners