I am using ORM 2013.1.219.3 and ASP.NET Web API with Kendo UI.
In my Entities model I have table called "Assets" with a column called "CreatedDate". The column value is set by a Default Constraint "GetDate()" added to the table. In the model I set the fields's Kind value to PersistentReadOnly and the resulting class has the correct property defined:
I can get the value and display it correctly on a web page when editing the record. The problem I am having is when I click Save to submit my changes an error is thrown on this line "TEntity attachedEntity = dataContext.AttachCopy(entity);" in the OpanAccessBaseRepository class. The error message is "The update of field 'AssetTracking.DataLayer.Asset._createdDate' is not allowed."
TEntity Update(TEntity entity)
TEntity attachedEntity = dataContext.AttachCopy(entity);
TEntity detachedEntity = dataContext.CreateDetachedCopy(attachedEntity, fetchStrategy);
How do I indicate to OpenAccess that the field should not be included in the update?