Hi All,
 
I have a few questions regarding the following example.
 
I have two tables Employee and Department with the following spec.
EMPLOYEE:
------------------
 
EMPID     VARCHAR
ENAME    VARCHAR
DEPTID    VARCHAR
 
DEPARTMENT
---------------------
DEPTID  VARCHAR
DNAME  VARCHAR
 
Here DEPTID in employee is foreign key. They have a Many-One uni directional relationship (Department-Employee).
 
If set the relationship in ejb-jar.xml and jbosscmp-jdbc.xml and let the jboss create tables, it is creating
the column in Employee with some other name other than DEPTID even if say it clearly in the column name of 
 foreign key relationship. Why is it so?
My second question is : Since  the relationship is unidirectional, Employee has no cmr field , how do i insert a single employee record in to the database?
I cannot do it through ejbCreate(String EmpID,String EmpName,String DeptID) . Essentially my problem is to insert a record in to the Employee table along with the foreign key field (DeptID).
 
Thanks In Advance
Rama Rao

Reply via email to