In a Student and Group relationship, where a student can create a ‘group’ of which other students can be members, this is a many to many relationship.
Now, i need to be keep track of which student is owner/creator of the group.
So, if i was not using Hibernate ORM i would have definately created the relationship as 
I would like to know if there is a better way, to avoid creating the mapping table as object in hibernate orm?
The
mappingtable is definitely the way to go when developing a many-to-many relationship. If you don’t want to store theisOwnerin themappingtable, you could store anownerIdin theGrouptable and have that point to a particularStudentid.If you look at this tutorial, they don’t generate a hibernate object for the many-to-many relationship, but the table still exists. You’re going to need a join table of some sort to correctly represent a many-to-many relationship. By moving the
isOwnerinto the group, you won’t need the hibernate object to access the owning student since you can get to it from theOwnerobject.