• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Clarification on Relationship Example Needed

 
Emil Jennings
Ranch Hand
Posts: 75
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So I'm currently going through Apress Beginning Hibernate, 2nd Ed., and in chapter 6 it has:
Listing 6-15. Mapping a One-to-Many Relationship from the Book entity to the Publisher entity

Listing 6-16. Mapping a Many-to-One Relationship from the Publisher entity to the Book entity

Listing 6-15 is in the Publisher class and 6-16 is in the Book class. It's the descriptions of the listings that is confusing, are they truly accurate or would it make more sense if they said:
Listing 6-15. Mapping a One-to-Many Relationship from the Publisher entity to the Book entity
Listing 6-16. Mapping a Many-to-One Relationship from the Book entity to the Publisher entity

The way they currently read to me is that there is one book for many publishers(6-15) and there are many publishers for a book(6-16), when the opposite is true. Any thoughts?
 
joy b chakravarty
Ranch Hand
Posts: 62
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Listing 6-15. Mapping a One-to-Many Relationship from the Publisher entity to the Book entity
Listing 6-16. Mapping a Many-to-One Relationship from the Book entity to the Publisher entity


I agree with you
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic