posted 1 year ago
I am trying to create an application which schools can use for Prom to assign a ticket to a student and enter the ticket number in the website to grant access.
Since a student ID can be the same at different schools, I created a composite key for the student ID and school ID in mySQL.
Here is the student class. Getters and Setters omitted.
So, I created a student identity class to map the school ID and student ID together, but since School also has its own entity class, I'm not sure I did it right.
I'm getting an error. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.AnnotationException: Unable to find properties (studentId, school) in entity annotated with @IdClass:com.kenmilota.promticket.entity.Student