Skip to main content
Dat 3. semester
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

03 JPA Relations

Monday

  • Friday exercise review. Prepare a short presentation of your solution to the Friday exercise.
  • Agree among the team members who should present their solution.

Tuesday (class)

Prepare for class

Reading

Video

Exercise (in class)

Wednesday (CodeLab)

Thursday (class)

Prepare for class

Video

Reading

Exercise (in class)

Friday (portfolio dev day)

  • Continue working on your portfolio project. Add JPA relations to your project. Use java interfaces to declare the DAO methods that you will need for CRUD operations and for the JPQL queries that you will need for your project. Implement the DAO methods and test them as you go along.
  • Remember to keep the relationships as simple as possible and be conservative with the use of cascade types. You can always add more cascade types later on if you need them. Also, think about whether you need bi-directional relationships or if unidirectional relationships are enough for your use case. Remember that you can always add more relationships later on if you need them.
  • Implement some JPQL queries to get data from the database. Be creative and try to get data from the database in different ways. You can use the JPQL queries to get data by joining different entities together.
  • Setup Unit tests for you DAO interfaces.