Search a title or topic

Over 20 million podcasts, powered by 

Player FM logo
Artwork

Content provided by Trevor Page: Java Guru | Programmer | Teacher. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by Trevor Page: Java Guru | Programmer | Teacher or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://podcastplayer.com/legal.
Player FM - Podcast App
Go offline with the Player FM app!

Hibernate @OneToMany Bidirectional Relationship

34:09
 
Share
 

Manage episode 435157850 series 3594147
Content provided by Trevor Page: Java Guru | Programmer | Teacher. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by Trevor Page: Java Guru | Programmer | Teacher or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://podcastplayer.com/legal.

Since we’ve already learned about the unidirectional @ManyToOne relationship, we can now move on to talking about what a bidirectional relationship is like, when using Hibernate. The term “bidirectional” literally means “functioning in two directions”, which is the concept that we will apply in our relationships between two Java objects. When we have a bidirectional relationship between objects, it means that we are able to access Object A from Object B, and Object B from Object A. We can apply this logic to our real world coding example that we saw in the last post. The example we will use is the relationship between an Employer and an Employee. Previously, we only defined a unidirectional relationship, so we could only access the Employer from the Employee object and not vice-versa. Now let’s take a look at how to transform our existing unidirectional relationship into a bidirectional one.

  continue reading

112 episodes

Artwork
iconShare
 
Manage episode 435157850 series 3594147
Content provided by Trevor Page: Java Guru | Programmer | Teacher. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by Trevor Page: Java Guru | Programmer | Teacher or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://podcastplayer.com/legal.

Since we’ve already learned about the unidirectional @ManyToOne relationship, we can now move on to talking about what a bidirectional relationship is like, when using Hibernate. The term “bidirectional” literally means “functioning in two directions”, which is the concept that we will apply in our relationships between two Java objects. When we have a bidirectional relationship between objects, it means that we are able to access Object A from Object B, and Object B from Object A. We can apply this logic to our real world coding example that we saw in the last post. The example we will use is the relationship between an Employer and an Employee. Previously, we only defined a unidirectional relationship, so we could only access the Employer from the Employee object and not vice-versa. Now let’s take a look at how to transform our existing unidirectional relationship into a bidirectional one.

  continue reading

112 episodes

All episodes

×
 
Loading …

Welcome to Player FM!

Player FM is scanning the web for high-quality podcasts for you to enjoy right now. It's the best podcast app and works on Android, iPhone, and the web. Signup to sync subscriptions across devices.

 

Copyright 2025 | Privacy Policy | Terms of Service | | Copyright
Listen to this show while you explore
Play