Gravity icon indicating copy to clipboard operation
Gravity copied to clipboard

Remove or change signature of UpdateField

Open Arithmomaniac opened this issue 6 years ago • 0 comments

https://github.com/tsdservices/Gravity/blob/075de8e177e33c903227f00bf58863484e59649e/Gravity/Gravity/DAL/RSAPI/RsapiDao.Update.cs#L104-L105

The code in this method is hard to understand, and the rules for mapping values to RDO values do not follow the same ones as in ToHydratedDto.

More broadly, what is this code trying to solve? We have mapping code elsewhere. If it's because sometimes you want to just set a single field, then either we should implement #25, or just add a params at the end of UpdateRelativityObject and related methods that lets you specify which fields you want to update, like seen here.

At a bare minimum, we should use the same basic mapping logic we use in ToHydratedDto, even if that requires the end user to specify the field type along with the GUID.

Arithmomaniac avatar Mar 02 '18 18:03 Arithmomaniac