Skip to content

hemanthgit/HibManyToMany_BiDirectional_App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

HIbernate Many To Many BiDirectional Mapping with Annotations

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages