I am creating a backend service for a MongoDB database and I am using Mongoose to work on the db. Someone created all the fields with all lowercase letters on the database and if I don't create the schemas with the exact casing and I use camel casing on my schemas and interfaces so none of my queries work. Is there a way to ignore casing on field names or specify the collection property directly when creating the schema?
EDIT: This is something I can do with golang mongo-driver:
type Company struct {
ID primitive.ObjectID `bson:"_id"`
Name string `bson:"name"`
Address string `bson:"address"`
TaxNumber string `bson:"taxnumber"`
}
All the field names on the collection are all lowercase but the struct field names are all PascalCase.