Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help With Association Object Mapping

 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't expect a solution here because I know that the information has to be out there. I just don't know what it is called. I have three objects.

User
Role
Book

I need to map some sort of UserBookRole object. Book and User is a ManyToMany. A user can have different roles for different books. For example


So what is this type of association called and where can I go to learn how to create the mappings correctly?

Thanks.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Many valued entity association. Alright, found it in my book. But would like some feedback.



And then in my Book object I have this:



Does that look right?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic