Joined: Mon May 09, 2005 1:32 am Posts: 7 Location: Bangalore
|
Hi,
I am having problem using formula...
I have somthing like this....
<property name="deptName" formula="(select dept.deptName from DepartmentDTO dept where dept.empId=empId)"/>
where deptName is a field which belongs to EmployeeDTO and i have to get the deptName from the DepartmentDTO based on the empId...i am getting a problem like java.lang.ClassCastException :org.hibernate.mapping.Formula....why is it so?my deptName in EmployeeDTO and DepartmentDTO both are String type........actually the Employee table has a primary key which is composite id (combination of empId and deptId)..can anyone help me out why am i getting this....i think this should work fine........is the problem coz of the composite id..?i am usinh hibernate3..
Thanking u in advance....
|
|