This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Weird Collection Name Due to Mongoose utils.toCollectionName #2957
Labels
status: needs-triage
Possible bug which hasn't been reproduced yet
Link to reproduction
https://github.com/rawkode/payload/tree/bug/pluralize
To Reproduce
Create a
CollectionConfig
with a slug ofpeople
.Describe the Bug
Inspect the mongoDB tables and one will be called "peoples"
I tracked this down to
utils.toCollectionName
in mongoose, which in turn callspluralize
, available here.This could be by-passed by providing a variable on
CollectionConfig
to specify the collection name, which would then be passed toSchema()
via schemaOptionsPayload Version
1.9.5
The text was updated successfully, but these errors were encountered: