File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Help With Association Object Mapping Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Help With Association Object Mapping" Watch "Help With Association Object Mapping" New topic
Author

Help With Association Object Mapping

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

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.


GenRocket - Experts at Building Test Data
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help With Association Object Mapping
 
Similar Threads
Lazy association
Hibernate Association
Class Diagram -Association & Inheritance
Hibernate Association
Difference between aggregation, association and composition