FieldKind points to schema and collection by name but they are not always the same #2493
Labels
area/collections
Related to the collections system
area/schema
Related to the schema system
bug
Something isn't working
Milestone
And collection name is mutable, and thus a poor way of linking them.
We likely have a few references in the codebase that still assume they are the same and use the wrong means of getting a definition (relations).
Can only be done after #2451 as schemaField.Kind must point to the schema, and collectionField.Kind must point to the collection - at the moment they are the same property and thus cannot be detangled.
I suggest that collectionField.Kind references the linked collection by RootID, not by name, so that name mutations do not require a horrible cross-object update.
The text was updated successfully, but these errors were encountered: