1 1 The expression is of type String but should be of type Reference to CORA.Employee.

I have end shift entity which have cross module association  EndShift_Cora_Employee i want to store first name value from employee to end shift   how i can do that
2 answers

Hi Vijaya,

In the image you attached you are trying to set the association between EndShift and Employee and not the name of the employee. In this case I don't think you want to change the name of the employee, but set the association. You can do this by setting the employee that you want to associate as value in this expression, for example $employee. 

If this is not what you mean to do please provide more information!


PS. If you want to store the employee name on $endshift, you can create a string attribute on the endShift entity and set it to $employee/fullname. However this is not best practices, since you will be storing the name in two places. So usually it shoulf suffice to associate endshift with employee.



You are working with associations now and that means you simply need to store the association. So remove everything and only store the employee object in that box. 


Once that is done you will have the association available to the employee to retrieve the name. Otherwise add an attribute to end shift that is employee name, type string and then added the employee name on that attribute.


But you cannot mix data types. If you are setting up an association you will need to use only the object.