There are several annotations we can use in JPA entities to define relationships between them. In our
Customer entity shown above, we can see that the wizard detected several one to many relationships in the
CUSTOMER table, and automatically added the
@OneToMany annotation to define these relationships in our entity. Notice that each field annotated with the
@OneToMany annotation is of type
Customer is the "one" side of the relationship, since a customer can have many orders, many addresses (street, mail, etc), or many telephone numbers (home, work, cell, etc.). Notice that the wizard uses generics to specify the type of objects we can add to each collection. Objects in these collections are the JPA ...