Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9157951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:08:22+00:00 2026-06-17T13:08:22+00:00

In a Student and Group relationship, where a student can create a ‘group’ of

  • 0

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 Student group many to many rel

I would like to know if there is a better way, to avoid creating the mapping table as object in hibernate orm?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T13:08:23+00:00Added an answer on June 17, 2026 at 1:08 pm

    The mapping table is definitely the way to go when developing a many-to-many relationship. If you don’t want to store the isOwner in the mapping table, you could store an ownerId in the Group table and have that point to a particular Student id.

    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 isOwner into the group, you won’t need the hibernate object to access the owning student since you can get to it from the Owner object.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider this query to group a list of students by the 1st letter of
I am working in a student group with several other people. We would like
so this is my table-- create table student ( stu_id int, s_name nvarchar(max), s_subject
I have a data structure where students and groups have many-to-many relationship. I have
We (a group of 4 students) are planning to create a web-app on Ruby
Here is my JSON which I need to parse: {opcode:groupdetails, status:success, data:[{Group ID:5,Group Name:data
I work with my student group on a project : We have some problems
I have a table that includes some student group name, lesson time, day names
A student in my class brought this to my attention, and I didn't have
INSERT INTO [Temp].[dbo].[Student] ([Fname], [Lname], [Gender]) VALUES (N'Aname', N'Alname', N'Male') GO This codes workes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.