Allow tables to handle _id values in non DS+ rows #14929
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR allows the usage of existing values for an
_id
column on non-datasource-plus sources. An example is Mongo, which has it's own concept of_id
separate to Budibases. The current table component assumes that non DS+ sources will not contain this field, and therefore overwrites it with a UUID in order to be able to uniquely identify each row.This PR will now use existing
_id
values if they exist, trusting that they are unique, and continuing to generate them if not.I've also updated the additional context we pull from tables to better reflect the available data. This means that fields like
_id
and__idx
which the table generates for internal use will not appear in live binding evaluation.Assumptions
The grid has 2 remaining assumptions.
_id
values in non DS+ rows are unique_id
values in non DS+ rows do not start with‽‽
(that's not a question mark, it's an obscure character chosen since it's extremely rare and will never be used)Addresses
A customer issue.