Skip to content
TrackPodcasts
technologyJul 28, 201434:09pending

Hibernate @OneToMany Bidirectional Relationship

Get every episode summarized

Each time How to Program with Java Podcast publishes, we email you a written briefing from the transcript — the topics, who appeared, and any specific claims, with the ad reads skipped.

Email me new episodes

Free for 3 shows. No card needed.

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.

Hosts & guests

No transcript yet

This episode has not been transcribed. Request it and it moves to the front of the queue.

Hibernate @OneToMany Bidirectional Relationship

How to Program with Java Podcast

0:00
34:09

More episodes

More from How to Program with Java Podcast

View all episodes →