Spring Boot # JPA @ManyToMany mapping on instanceVariable of an @Entity

24 views
Skip to first unread message

Pankaj Nimgade

unread,
Apr 1, 2018, 12:14:56 PM4/1/18
to Google App Engine
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

Katayoon (Cloud Platform Support)

unread,
Apr 1, 2018, 3:26:40 PM4/1/18
to Google App Engine
Hi, I should note that Google Groups are reserved for general Google Cloud Platform-end discussions. For any question on Spring Boot I recommend to post your question on the respective support center.
Reply all
Reply to author
Forward
0 new messages