PocketBaseClient icon indicating copy to clipboard operation
PocketBaseClient copied to clipboard

Dealing with PocketBase fields with unexpected names

Open iluvadev opened this issue 3 years ago • 0 comments

PocketBase allows field names that can not be translated correctly to Properties in C#:

  • _ -> Is translated to Empty string
  • __ -> Is translated to Empty string. Same PropertyName as _
  • 1 -> Is translated to "1", forbidden name for a Property
  • _1, 1_, _1_ -> All translated to "1", forbidden name for a Property. Same PropertyName as 1

And allows multiple fields that will be translated to the same Property name in C#:

  • field, _field, __field, _field_ -> All translated to same PropertyName: Field
  • my_field, my__field, _myField_, MyField -> All translated to same PropertyName: MyField

iluvadev avatar Feb 05 '23 10:02 iluvadev