Bidirectional Associations

Let's learn about bidirectional associations.

How to eliminate bidirectional associations

A bidirectional association is replaced with a mutually inverse reference property pair. If we consider the association between the classes Book and Author, shown in the model in the figure below, we have the Book::authors and Author::authoredBooks pair. Since both reference properties represent the same set of binary relationships, we have the option to define one property as the leader and the other as the follower (which is derived from the leader). We discuss the two cases of one-to-one and many-to-many association.

Get hands-on with 1400+ tech skills courses.