A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Object Relational Mapping
Hibernate Composite & foreign key, please help
Joined: Dec 20, 2005
Jun 10, 2010 01:43:12
I need some help regarding Hibernate Composite & Foreign key.
Here is my scenario:-
I have two tables :
TableA (consisting of a primary key id1) ;
TableB (consisting of a composite primary key (id1, dtl) ) --> here , id1 is foreign key referencing id1 of TableA.
TableB can have multiple rows for each id1 of TableA.
How should I define the mapping elements, for "TableA left join TableB".
Kindly help me. I am struggling a lot , but couldn't find a solution.
Thanks in advance.
Devisri, SCJP 5.0, SCWCD 5.0
"Dream is Not what you see in sleep. Dream is that which never lets you sleep" - Abdul Kalam
subject: Hibernate Composite & foreign key, please help
Hibernate one-to-on id mapping issue
How make Entity with composite primary key in some other Entity's primary key?
Legacy and Hibernate1-2-M Mapping
hibenate delete problem
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015