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

  • Home
  • SEARCH
  • 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 800359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T23:16:50+00:00 2026-05-14T23:16:50+00:00

In Hibernate tutorial, chapter 25 best practices says we should use 2 one-to-many relationship

  • 0

In Hibernate tutorial, chapter 25 best practices says we should use 2 one-to-many relationship instead of one many-to-many with an intermediate link class.
I can’t see what is the benefit of it : why is it better to create a 3d entity while the many-to-many can generate a join table that is acting as this intermediate link.
However this recommendation must be there for a good reason.

Can somebody explain the ground for this recommendation ?
Thank you.

  • 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-05-14T23:16:51+00:00Added an answer on May 14, 2026 at 11:16 pm

    Many-to-many relationships quite often develop barnacles — extra data that is associated with the relationship itself, rather than either of the participants in the relationship (in my experience, this is the norm rather than the exception). For instance members and groups might be associated in a many-to-many way, and you want to know when a member joined a group, what their membership status is (new, pending, suspended, …) and so on.

    If you start by modelling the relationship directly as a many-to-many and write all your code accordingly, the very first extra column that hits the join table will break your model and a bunch of code.

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

Sidebar

Related Questions

Hibernate has a handful of methods that, one way or another, takes your object
With Hibernate, can you create a composite ID where one of the columns you
I just finished the Netbeans introduction to Hibernate tutorial ( http://netbeans.org/kb/docs/web/hibernate-webapp.html#01 ) and I
im new to hibernate! i have followed the netbeans tutorial on creating a hibernate
Beginner here to hibernate, spring. Followed tutorial here to setup hibernae + spring +
I am new in hibernate,after read the hibernate api and tutorial,it seems that the
I have read several tutorial concerning the for hibernate. I'm still getting confusion. Does
I am trying to teach my self hibernate with a net-beans tutorial. Here are
Is there any online tutorial/example or project which shows how to implement hibernate with
I am using NetBeans 6.5.1 and Hibernate 3.2.5. I stepped through this tutorial by

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.