Convex Ents: inconsistent singularization of field names
In Convex Ents many-to-many relationships, I noticed that Convex Ents generates field names that use tables names themselves, as opposed to the singular forms of those table names.
This behavior is inconsistent with the one-to-one and one-to-many relationships, which generate fields using the singular form of table names.
Let's take the example in https://labs.convex.dev/convex-ents/schema#manymany-edges. Here,
I think Convex Ents generates field names in the messages_to_assignedTags junction table as tagsId and messagesId.
If Convex Ents were consistent with one-to-many relationships, the generated fields would be tagId and messageId.
1) What is the expected behavior of Convex Ents?
2) My table names have a plural form, e.g.
messages
. To best use Convex Ents now and in the future, should the fields in junction tables use the singular or plural form of table names? i.e. messageId or messagesId?Ent Schema - Convex Ents
Relations, default values, unique fields and more for Convex
1 Reply
By the way, I was able to use the
field
option to make the many-to-many succeed with singular-named columns.