Hi Everyone,
I am interrested in learning the work done behind the screen on database when Class (Entity) has one of its instance variable
List<E> exampleList, has mapping one of mentioned below
@Entity
@Table(name = "COURSE")
public class Course {
@Id
@GeneratedValue
private Integer id;
@Column
private String name;
@Column
private Integer credits;
@ManyToMany(fetch = FetchType.EAGER,
cascade = CascadeType.ALL)
private List<Course> prerequisites = new ArrayList<>();
}
@ManyToMany
@OneToMany
@ManyToOne
I understand, this implementation will allow us to get list of prerequisitsfor any given course instance with that unique ID. I would like to learn how a database looks and saves this mapped document(rows) under these curcumstances and What exaclty JPA specification for
CurdRespository handles it.
Regards
Pankaj Nimgade