-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Do you need one object per table?
PostPosted: Wed May 12, 2004 2:56 pm 
Beginner
Beginner

Joined: Wed May 12, 2004 2:52 pm
Posts: 36
I have the following tables

User
--------
user_id
user_name

UserRoleAssoc
------------
user_id
role_id

Role
----------
role_id


Do I have to have a class for "UserRoleAssoc"? Is there a way to avoid this?

Regards,

Joshua


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 12, 2004 3:05 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Just use a many-to-many association, you don't need an extra class.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.