GraphDiff icon indicating copy to clipboard operation
GraphDiff copied to clipboard

How to indicate that specific entity attribute is not to be updated?

Open arangari opened this issue 11 years ago • 2 comments

I would like to know if we can define if specific attribute of the entity is not to be updated. eg. public class myclass { public string col1; public string col2; publict int col3; myclass () { col1 = col2 = string.Empty, col3 = 0} }

I receive myclass object in through post/put request. I know that col3 is set to 0 by default. However while updating the db, i do not want to update col3 value if entity already exists.

can i define something like updategraph(myclass_obj, map=> map.donotmodify(obj=>obj.col3) )

if so, can we do something as below:

foo(myclass entity, Expression<> dontmodify) { updategraph(entity, mm=>mm.OwnerCollection().AddToMap(dontmodify)) }

where AddToMap adds into the the maps of IUpdateconfiguration.

arangari avatar Nov 06 '14 12:11 arangari

Hi,

currently GraphDiff has no such feature, sorry.

ghost avatar Nov 06 '14 14:11 ghost

Would we consider this as possible enhancement?

arangari avatar Nov 07 '14 04:11 arangari