This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multi-level Mapping

 
Anandharaj Selvaraj
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I got one problem in Hibernate mapping. Here's the sample structure of my existing code.



Problem
-------
The table SUB_CHILD_TBL wants tobe mapped in both CHILD_TBL & PARENT_TBL.
When we are doing like that, in parent level we will be inserting "*" in the column "CHILD_PK_COL3_ID" in SUB_CHILD_TBL .
In Child level we will be inseting CHILD_PK_COL3_ID of CHILD_TBL to SUB_CHILD_TBL. We tried to map like the following;



When we trying this, we are getting all the records. Actually we should get only the "*" records.
In the Mapping we didn't gave the "CHILD_PK_COL3_ID" column. So it's retriving all the records.

Can any one tell me, how to solve this problem?.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic