I am running into an issue where my mongoose model does not seem to recognize all the properties assigned to it when hydrated with data from the db. I am simply trying to access the "make" property of the objects I imported from a CSV.
Model:
const mongoose = require('mongoose'); const productSchema = new mongoose.Schema({ model: String, make: String, keyType: String, years: String, rsType: String, activeRemotesFobs: String, partNumber: String, cost: String }) const Product = mongoose.model('Product', productSchema); module.exports = Product; Query to fetch all rows:
exports.index = (req, res) => { Product.find({}, function(err, products){ console.log(products[0]) console.log(products[0].make) res.json(products) }) }; And the output from that query:
{ _id: 5a7f2bf4dd2ee45983440017, 'make': 'TOYOTA', model: 'RAV4', keyType: 'STEEL (G/H) KEY', years: '2011-2018', rsType: 'RS ONLY W/FACT. REMOTES + APP', activeRremotesFobs: 'FACT. REMOTES ONLY & APP', partNumber: 'FLRSBA/ASCL6', cost: '$719' } undefined So, clearly there is something different about 'make', as I cannot access that property. All the other properties are easily accessible. I imported this using mongoimport, with a headerline that matches my properties. Here is a screenshot of the same record using robomongo, a GUI for mongodb
Any help would be appreciated. I have tried renaming the column, changing the order in my schema, and re-importing the records many times with no luck.

mongoose.modeltwice and setmodule.exportstwice, or is that a copy/paste error on your post here?products[0]['make']?products[0].makeconsoled out as Toyota. Are you on the latest version of everything? See if you can repeat the problem in another schema file with a different name.