I am trying to retrieve an object to allow me to update it but get the following error message:
Telerik.OpenAccess.Exceptions.MetadataException: The field 'appraisalAssignment' of class 'EMS.DAL.Appraisal' must use nested db-column extensions in a db-ref extension as the class 'EMS.DAL.AppraisalAssignment' has a composite primary key. --> EMSEntityContext/namespace[EMS.DAL]/class[Appraisal]/field[appraisalAssignment]/db-column
I am using the following to get an existing object:
StatisticalDatum updatedStats = ems.StatisticalData.Where(sd =>; sd.AppraisalId
where all I am interested in updating this specific object.
However, the object with the composite primary key is AppraisalAssignment which has a 4 field key and the object relationship is:
AppraisalAssignment -> Appraisal -> StatisticalDatum.
I cannot see, from the domain model, how to create the nested db-column extensions as described in the error message and in any case, I don't have all the values of the composite primary key for AppraisalAssignment at this point in the code.
How am I able to get around this situation?