| 
					
						 Hi,
 
 I am developing a workflow management system using jboss-jbpm. I am using mysql as database,
 and using hibernate for OR mapping.
 
 Problem: I got a parent table(Name:User_Table) and a child table(Name:Member_Table)
 There is a primary key foreign key association with User_Table and Member_Table.
 The primary key field in User_Table is an autoincriment field.
                          Two Value Objects(VO) are there for each Tables.
 when i save the datas into the User_Table one row is also inserted in the 
 Member_Table,but the foreign key column is null.
 
 My *.hbm.xml files are given below
 
 
 1)Membership.hbm.xml
  <class name="MembershipVO" table="Member_Table">
         <id name="id" type="int" column="ID_" />   
          <property name="name" type="string" column="NAME_" />
          <property name="role" type="string" column="ROLE_" />
         <property name="group" type="int" column="GROUP_" />
         <property name="memberClass" type="string" column="CLASS_" />       
               <many-to-one  name="userVO" class="UserVO" column="USER_"></many-to-one> 
     </class>
 
 2)User.hbm.xml
 
 	  <class name="UserVO" table="User_Table">
         <id name="id" type="int" column="ID_" >
 <generator class="native"></generator>
         </id>
         <property name="userName" type="string" column="NAME_" />
         <property name="password" type="string" column="PASSWORD_" />
         <property name="email" type="string" column="EMAIL_" />
          <property name="userClass" type="string" column="CLASS_" />
     </class>
 
 
 
 Thanks in advance
 Dejies 
					
  
						
					 |