• Post Reply Bookmark Topic Watch Topic
  • New Topic

Multi-level Mapping  RSS feed

Anandharaj Selvaraj
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.

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?.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!