-->
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.  [ 4 posts ] 
Author Message
 Post subject: ONE-TO-ONE composite ID foreign KEY
PostPosted: Sun Apr 03, 2016 4:52 am 
Newbie

Joined: Sun Apr 03, 2016 4:36 am
Posts: 3
Hellow, I am new with Hibernate, and I donĀ“t speak English very well but I need help with xml mapping.
I have an asociation one-to-one between two tables(ORDER_LINES and ORDER_LINES_ESPECIAL_DETAILS), but the probles is that both tables have a similar composite key.
I took several days looking for, and can not find the solution.

WORDS IN CAPITALS ARE THE PRIMARY KEY

TABLE ORDER:
ORDERNUMBER | Other fields

TABLE ORDER_LlNES:
ORDERNUMBER | LINE | Other fields...

TABLE ORDER_LINES_ESPECIAL_DETAILS (this tables depends of ORDER_DETAILS) and this can not exist.
ORDERNUMBER | LINE | other fields

My problem is the mapping between ORDER_LINES and ORDER_LINES_ESPECIAL_DETAILS. 1 ORDER_LINES can have associated 1 ORDER_LINES_ESPECIAL_DETAILS.

THANK YOU.


Top
 Profile  
 
 Post subject: Re: ONE-TO-ONE composite ID foreign KEY
PostPosted: Sun Apr 03, 2016 3:00 pm 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
Why don't you use annotations, you'll probably find more examples as such.


Top
 Profile  
 
 Post subject: Re: ONE-TO-ONE composite ID foreign KEY
PostPosted: Fri Apr 08, 2016 12:13 pm 
Newbie

Joined: Sun Apr 03, 2016 4:36 am
Posts: 3
mihalcea_vlad wrote:
Why don't you use annotations, you'll probably find more examples as such.


The project is well advanced and developed with XML mapping.


Top
 Profile  
 
 Post subject: Re: ONE-TO-ONE composite ID foreign KEY
PostPosted: Mon Jun 06, 2016 7:31 am 
Newbie

Joined: Sun Apr 03, 2016 4:36 am
Posts: 3
mihalcea_vlad wrote:
Why don't you use annotations, you'll probably find more examples as such.


Can you teach with you would with annotations? Then try to translate it to .hbm.xml, because I find nothing.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.