-
Dec 30th, 2008, 02:36 AM
#1
Hibernate Mapping Problem
Hello all,
I have one table for e.g employee i mapped the dept table in that like
<set name="dept" table="dept" fetch="select" lazy="false" inverse="true">
<key>
<column name="employee_Id">
<comment></comment>
</column>
</key>
<one-to-many class="entity.Dept"/>
</set>
in employee.hbm.xml.
i get the record when i select the record but when i trying to insert the record in respective table but the entry is in employee table only not in dept table .
my dept table contians dept_id (pk),employee_id(pk),active
active for employee right now active for which department so when i retrive the record so i check the active if it 1 then only that particular record will be fetched but when i trying to insert the record so i confuse how it insert the record................
please help i am really getting confused
Thanks in advance .........
If the problem is not clear then tell me i can elaborate it .
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules