
Hibernate @OneToMany Bidirectional Relationship
About this episode
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.
More from How to Program with Java Podcast
I'm losing software contracts right now, and I want to tell you why. Business owners who would've paid me $10,000 to build them something are telling me they'll just build it themselves with AI. That…
It's been over a year since my last episode, and I owe you an update. In this episode, I get real about what happened with the Coders Campus coding bootcamp — why we had to shut down new admissions, a…
Episode Summary In this episode, Trevor Page delves into the challenges aspiring software developers face when trying to land their first job. Drawing from his 15 years of programming experience and 1…
Summary To reach out and connect with Alex, here's her LinkedIn profile: https://www.linkedin.com/in/alex-mamolo-2a1b57222/ In this episode, Trevor interviews Alex, who shares her journey from being a…
To reach out and connect with Tony: https://www.linkedin.com/in/edmonds-tony/ Takeaways - Negotiate your salary and consider the market conditions in your area. - Remote work opportunities are availab…