Announcement Announcement Module
No announcement yet.
Hibernate Mapping Problem Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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">
    <column name="employee_Id">
    <one-to-many class="entity.Dept"/>

    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 .