Dapper-Extensions icon indicating copy to clipboard operation
Dapper-Extensions copied to clipboard

Insert will store a value marked as readonly. Update will not.

Open jchannon opened this issue 12 years ago • 1 comments

If I create a ClassMapper and mark a property as ReadOnny() but then specify a value on my object and call db.Insert(myObj) it will insert the data with the specified value.

If I instantiate a object, set the marked Readonly property to a value and call db.Update(myObj) it won't update that field in the database.

Looking at the code Update filters out the properties marked as ReadOnly but Insert doesn't

jchannon avatar Oct 17 '13 09:10 jchannon

It's fixed on next release

valfrid-ly avatar May 06 '21 22:05 valfrid-ly