Dear Sir,
In response to your reply, I worked accordingly, but I was getting exception like org.Hibernate.HinbernateMappingException. Now I want to make my question more clear and lucid. My requirement is that I have a class like this
public class Employee {
Long id;
String firstName;
String lastName;
String designation;
String address ;
String emailId;
int age;
int salary;
}
I have to store the data in Multiple tables like this.
TABLE 1
id(pk) firstName lastName
TABLE 2
id(pk) Designation Adress
TABLE 3
id EmailId age salary
All tables are independent.
Table 1 may have 10 rows, Table 2 may have 13 rows, Table 3 may have 40 rows
Please help me how to do it. This my requirement. Please give me the mapping code snippet. I have to resolve this issue. I will write one mapping file that will store data in the multiple tables. I have a class that has a method
storeDataInDatabase(String fname,Strin lname....like this). I should not use <join>. Because using <join> I have tables that will refer the primary key of first table .
I will be happy if you give me some links on flexible mappings. Besides give me any link how to know the syntax of writing hibernate mapping file. I am simply following the standard mapping file.
Please respond to me in
piku.mishra@gmail.com