DU06 to be handed in before the 7th exercise

JPA relations

Java Persistent API

Use the project (game) from last semester and change the way the data is stored so that the data is stored in the database using JPA.

Create at least two entities (entity classes) that have a 1:N relationship between them.

Remember, as per the exercise, add dependencies, modify module-info.java, and add a persistence.xml file and module-info.java.

Then just create a class with the data (if you don't have one) and make it an entity class. That is, it must have an @Entity annotation, a constructor with no parameters, and some primary key - aunts some @Id.

Then use the class to store the data in the DB using the EntityManager class

Method of submission

Submit the homework solution to the Kelvin system as the "Java 2 - Homework 1 - Maven" assignment. Upload the entire contents of the src folder and the pom.xml (and run script) file to the system. Follow the attached video below.

The project will then be compiled and Unit Tests will be performed. Due to the nature of the project and the provisional testing use of the Kelvin system in the Java 2 course, do not despair in case of failure.

This is an auxiliary test, everything will still be evaluated manually. It is important to upload the files so that everything can be evaluated and analyzed for plagiarism. I believe this is a formality and all of you are creating your own code.