I m trying to join two tables say hiber_employee(id,empId,name,designation) and hiber_company(companyid,empid,grade,salary). but i dont want to store the joined values into a new table. i have made three persistence classes for each table and 1 POJO for the join. my hiber_join.hbm.xml file looks like..
It looks like you're trying to design your classes around the database. What you should be doing is design the classes then map them to the database. It looks to me like you should only have two classes, somthing like:
From there you could build your Company.hbm.xml and Employee.hbm.xml
Forget Steve. Look at this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss