From the course: Java Persistence with JPA and Hibernate

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Challenge: Art Class Management app, part 4

Challenge: Art Class Management app, part 4 - JPA Tutorial

From the course: Java Persistence with JPA and Hibernate

Challenge: Art Class Management app, part 4

(upbeat music) - [Instructor] In this fourth code challenge, you'll establish relationships between the entities. In the art class, a given teacher takes only one class, like oil painting class, recycles scrap art class, drawing hands class, or the water colors class as they're specialized in teaching each type of art. These different art classes are conducted by a single teacher, so there's a one-to-one relationship between art class and teacher. Also, there can be many reviews for a given teacher, so there's a one to many relationship between teacher and review, and a many to one relationship between review and teacher. Then there's a many to many relationship between student and art class. As a student can take many classes and a class can have many students in it. Before you start working on this challenge, make sure that the art class database is already created and that you've completed the previous challenges. In the main class, there are three empty methods to verify the…

Contents