Hi All,
I have 2 tables
1. Dept Table where in i have deptid,divid,dname,address as columns
2. Divsion table where in i have deptid,divid,divname,address, as columns
How can i map these two tables in .xml using one-to-one relation ship?
(generated .hbm.xml file will be of more help)
I)the Dept table has primary keys deptid,divid
II)the Divsion table has primary keys deptid,divid (these are the foreign keys)
and also one more question do all the tables need to have primary key?if yes why?
regards
Reddy
|