Домой United States USA — software Introduction to Spring Data JPA Part 7: Unidirectional Many-to-Many Relationships

Introduction to Spring Data JPA Part 7: Unidirectional Many-to-Many Relationships

323
0
ПОДЕЛИТЬСЯ

In this article, we discuss how to create many-to-many, unidirectional relationships with Spring Data JPA.
Let’s be friends:
Comment (0)
Join the DZone community and get the full member experience.
We will discuss the following:
Let us start by modeling the entities. Let us see how Hibernate creates the tables for us. A mapping table is created.
Since it is a Many-to-Many, Unidirectional relationship, the definition in the User is as follows, and the role entity will not have any definition.

Continue reading...