I have 2 primary Keys here.
Originally posted by Girish Kumar Prabhakar:
Hi Paul, I dont have 2 Primary Keys for one entity. I have 2 entites : Employee and Role. And both have there own Primary Keys as EmpId and EmpRoleId respectively. Now can you tell me how to create one to one mapping in this scenario. Thanks
cmbhatt
cmbhatt
I only want to update the EmployeeRole table and set roleId as 200 for empId as 1000. There will be no update or insert in Employee table.
cmbhatt
cmbhatt
cmbhatt
BUT the problem which i face now in this code is that empId for this newrole in EmployeeRole table is becoming null.
Also i have not set empId in EmployeeRole table as Unique constraint.
will that affect this.
cmbhatt
BUT the problem which i face now in this code is that empId for this newrole in EmployeeRole table is becoming null.
cmbhatt
If we don't do the shopping, we won't have anything for dinner. And I've invited this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|