Skip to content

Latest commit

 

History

History
10 lines (7 loc) · 590 Bytes

README.md

File metadata and controls

10 lines (7 loc) · 590 Bytes

HibManyToMany_BiDirectional_App

Only change in this relationship( ManyToMany Bidirectional) and ManyToMany Unidirectional is that, in the Subject class we have added following property.

@ManyToMany(mappedBy="subjects") private List students = new ArrayList();

Nothing else changes.We added this property in Subject class to make the relationship bidirectional. You can now navigate from Subject to Student.mappedBy attribute tells that this is the inverse side of relationship which is managed by “subjects” property of Student annotated with @JoinColumn.