From the course: Java EE 8 Essential Training

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Mapping associations

Mapping associations - Java EE Tutorial

From the course: Java EE 8 Essential Training

Start my 1-month free trial

Mapping associations

- [Instructor] The many to many association is the most difficult association to map in JPA. So I'm going to walk you through it in this lesson, in order to support our discussion I needed to preposition some items. So let's walk through those now. What we've done is we've created a scenario where each catalog item has an inventory manager or an item manager, you'll see that we created the item manager entity and it contains a list of catalog items so one item manager can manage many items, now if we look at the catalog item entity. You'll see that the item has a list of item managers, so this creates our many to many scenario and then the way we support this within the application, first if we take a look at our list. You'll notice that we are now able to link to an individual item page. So we've created a new facelet for the item details and here's the item facelet and if we take a look at that. You'll notice that this page…

Contents