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 - 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
-
-
-
-
-
-
-
-
(Locked)
One-to-one relationships8m 13s
-
@OneToMany and @ManyToOne annotations in a relationship8m 8s
-
(Locked)
Many-to-many relationships7m 29s
-
(Locked)
Inheritance9m 40s
-
(Locked)
More inheritance strategies9m 25s
-
(Locked)
Composition relationship11m 6s
-
(Locked)
Challenge: Art Class Management app, part 41m 58s
-
(Locked)
Solution: Art Class Management app, part 44m 41s
-
(Locked)
-
-
-