-->
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: Mapping without link table
PostPosted: Tue Sep 05, 2006 2:14 pm 
Newbie

Joined: Thu Jul 20, 2006 5:00 pm
Posts: 16
Can we have <many-to-many> mapping without the link table.

Excerpt from tutorial
Quote:

If you wish to represent a many-to-many association in a relational database, you must introduce a new table, called a link table. This table doesn’t appear anywhere in the object model. For our example, if we consider the relationship between a user and the user’s billing information to be many-to-many, the link table is defined as follows:

CREATE TABLE USER_BILLING_DETAILS (
USER_ID BIGINT FOREIGN KEY REFERENCES USER,
BILLING_DETAILS_ID BIGINT FOREIGN KEY REFERENCES BILLING_DETAILS
PRIMARY KEY (USER_ID, BILLING_DETAILS_ID)
)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 06, 2006 8:53 am 
Newbie

Joined: Thu Jul 20, 2006 5:00 pm
Posts: 16
Any word on this would be really a great help.


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.