-->
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.  [ 3 posts ] 
Author Message
 Post subject: Uni-Directional one-To-Many mapping from Table A to B
PostPosted: Wed Sep 23, 2009 11:00 am 
Newbie

Joined: Wed Sep 23, 2009 10:48 am
Posts: 4
Hi Everybody,

I have difficulty in Mapping Table A with Table B where B has a composite key
I want to do 1-To-Many mapping from A->B.
Example:-
Class A{
//custId is primary key of Table A
Integer custId;
//Do join with custId of Table A with custId of Table B.
List<B> listB;
}
Class B{

//composite key comprises of 4 keys as folows

Integer custId;
String firstName;
String lastName;
String city;

}


Top
 Profile  
 
 Post subject: Re: Uni-Directional one-To-Many mapping from Table A to B
PostPosted: Wed Sep 23, 2009 11:40 am 
Newbie

Joined: Wed Sep 23, 2009 10:48 am
Posts: 4
Currently I am trying this scenario in derby database.
Please respond ASAP.
Thank You Very Much.


Top
 Profile  
 
 Post subject: Re: Uni-Directional one-To-Many mapping from Table A to B
PostPosted: Wed Sep 23, 2009 2:38 pm 
Newbie

Joined: Wed Sep 23, 2009 10:48 am
Posts: 4
Just to add to my question.The entity property names are not same as(don't match) actual table column names.


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