json-flatfile-datastore icon indicating copy to clipboard operation
json-flatfile-datastore copied to clipboard

Error handling Guid in ObjectExtensions.AddDataToField

Open Stefan6440 opened this issue 1 year ago • 1 comments

idProperty.SetValue(item, data) throws an error when data is Guid System.ArgumentException {"Object of type 'System.String' cannot be converted to type 'System.Guid'."}

My solution proposal :

image

Stefan6440 avatar Dec 04 '23 14:12 Stefan6440

Thanks for the issue!

Currently json-flatfile-datastore only supports int and string id-fields. I just noticed that this is not mentioned clearly in the documentation. I will update that.

I will check if we could add a support for Guid id-fields. https://github.com/ttu/json-flatfile-datastore/compare/fix-guid-as-id?expand=1

ttu avatar Dec 21 '23 23:12 ttu