So I want to implement a Jpa Repository of my class Reservation.
My RoomType Enum:
public enum RoomType{
BREUGHELZAAL("Breughel zaal"),
CARDIJNZAAL("Cardijn zaal"),
FEESTZAAL("Feest zaal"),
KEUKEN("Keuken"),
RECEPTIEZAAL("Receptie zaal"),
KLEINEKEUKEN("Kleine keuken");
private String roomType;
RoomType(String roomType){
this.roomType= roomType;
}
public String getRoomType(){
return roomType;
}
}
Now I have no clue how to implement this. I need a List of Enum types in my reservation class, i guess it is something like this, but I don't know the annotation for the enum type:
@OneToMany(cascade = CascadeType.ALL)
List<RoomType> chosenRooms
Thanks in advance for the help!!