-->
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.  [ 1 post ] 
Author Message
 Post subject: one-to-one mapping problem
PostPosted: Tue Dec 21, 2004 12:55 pm 
Beginner
Beginner

Joined: Tue Dec 21, 2004 11:53 am
Posts: 42
Hi there! I have a table called available_products in schema X with only one column : product_id which is a FK to a table called products on schema Y.

Since the only column on this table is the PK + FK (Please, I wasn't the DBA for the project).

What's the best choice to map this? I found two solutions, none seems to work:

Have a property Product on the availableProducts class and map as a one-to-one association to Product (did not work cuz it would be mapped to the same column as the id, and it complains about duplicate column)

Have only a composite key on availableProducts which is a Product it self.

Any ideas???


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

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.