synced with master

This commit is contained in:
Gani Georgiev
2023-07-03 20:53:09 +03:00
6 changed files with 50 additions and 7 deletions
+1 -1
View File
@@ -190,7 +190,7 @@ func (f SchemaField) Validate() error {
excludeNames := BaseModelFieldNames()
// exclude special filter literals
excludeNames = append(excludeNames, "null", "true", "false")
excludeNames = append(excludeNames, "null", "true", "false", "_rowid_")
// exclude system literals
excludeNames = append(excludeNames, SystemFieldNames()...)
+9
View File
@@ -313,6 +313,15 @@ func TestSchemaFieldValidate(t *testing.T) {
},
[]string{"name"},
},
{
"reserved name (_rowid_)",
schema.SchemaField{
Type: schema.FieldTypeText,
Id: "1234567890",
Name: "_rowid_",
},
[]string{"name"},
},
{
"reserved name (id)",
schema.SchemaField{