Just noticed an issue with not nullable numeric types when editing.
When creating a new entity with RAD generated ui allows us to leave numeric (int, decimal etc) blank and when you save the content as those blank properties are not included in the request payload the backend uses the default values for those properties to save them in the db without any exception. However when it comes to edit the entity those properties are filled with default values (0). When you clear those default values (leave the fields blank) then hit the save button you get the exception as something like "Error converting value {null} to type 'System.Decimal'. "
What would be the best way to ignore those little annoying execptions? I assume that if the UI wouldn't let us click the "Save" button when those fields are empty (form is not valid by adding required) that would be a solution. But somehow even those fields are required it allows to save them in the first instance as empty. Maybe RAD generator should be changed to make those fields required?
Regards
1 Answer(s)
-
0
Hi @adamphones
Could you share the genererated entity for us to test this ?
Thanks,