| 
					
						 I am running into the following issue.  Any help will be greatly appreciated.
 
 Hibernate version: 2.0
 
 Mapping documents:
 
 RoleManagement.hbm.xml
 
 <?xml version="1.0"?>
 <!DOCTYPE hibernate-mapping PUBLIC
   "-//Hibernate/Hibernate Mapping DTD//EN"
   "http://hibernate.sf.net/hibernate-mapping-2.0.dtd">
 
 <hibernate-mapping>
 	<class name="scigames.usermgmt.hibernate.beans.RoleManagement" table="rolemanagement">
 		<id name="roleMgtKey" column="ROLEMGTKEY">
 			<generator class="native"/>
 		</id>
 		<property name="roleKey" column="ROLEKEY"/>
 		<property name="usersKey" column="USERSKEY"/>
 
 	</class>
 </hibernate-mapping>
 
 User.hbm.xml
 
 <?xml version="1.0"?>
 <!DOCTYPE hibernate-mapping PUBLIC
   "-//Hibernate/Hibernate Mapping DTD//EN"
   "http://hibernate.sf.net/hibernate-mapping-2.0.dtd">
 
 <hibernate-mapping>
 	<class name="scigames.usermgmt.hibernate.beans.User" table="users">
 		<id name="usersKey" column="USERSKEY">
 			<generator class="native"/>
 		</id>
 		<property name="networkId" column="NETWORKID"/>
 		<property name="status" column="STATUS"/>
 		<property name="languageKey" column="LANGUAGEKEY"/>
 		<property name="printQ" column="PRINTQ"/>
         <property name="comments" column="COMMENTS"/>
         <property name="fName" column="FNAME"/>
         <property name="lName" column="LNAME"/>
 
         <set name="roleCollection" table="rolemanagement">
             <key column="USERSKEY"/>
             <many-to-many
                     column="ROLEMGTKEY"
                     class="scigames.usermgmt.hibernate.beans.RoleManagement"/>
         </set>
 	</class>
 </hibernate-mapping>
 
 When I deploy the application with the above mappings, I get the following error:
 javax.servlet.UnavailableException: Foreign key (rolemanagement [ROLEMGTKEY])) must have same number of columns as the referenced primary key (rolemanagement [USERSKEY,ROLEMGTKEY])
 
 
 Name and version of the database you are using: Using Oracle 10g
 
 Any suggestions?
 
 Thanks 
											 _________________ Sharma Vedula
					
  
						
					 |