-->
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: Design many-to-one relationship with two columns id
PostPosted: Tue Oct 19, 2004 7:05 am 
Newbie

Joined: Fri Oct 08, 2004 4:05 pm
Posts: 1
Hi.

I just started using Hibernate and I'm impressed of its power and flexibility. I've designed schema (mappings) for almost 100% of my database, but now I stucked with one relationship. Unfortunately the database is not designed by me and I cannot change it.

I have two tables

Code:
PICK_TABLE:
- guid           this is the PK
- pick_type      type of pick list
- pick_nr        actual index of pick item

REFERER_TABLE (example)
- guid           this is the PK
- some_pick_nr   index of pick in PICK_TABLE



Pairs pick_type-pick_nr are unique in PICK_TABLE. In different REFERER_TABLEs, every some_pick_nr "knows" to what pick_type it refers. Is there any possibility to write it down in mapping file? Or maybe is there any workaround?

Thanks,
Kryzys


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.