Table helper name ambiguity
If I have a Table defined like so:
I can see that convex creates a new table called tableViewd in the dashboard, so not sure what the "tableViews" string is being used for? @ian
1 Reply
You can click into the code to see - it affects the _id validator and types returned. So e.g. if you use the
TableViews.doc
validator it'll both expect a type of Id<'tableViews'>
and at runtime it'll check that the _id
is an ID in a "tableViews" table. If you don't use ._id
, .withSystemFields
, .doc
, or .systemFields
then it doesn't affect anything
here you're immediately using .table
so it's equivalent to defineTable(tableViewsFields).index...