We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I'm trying to get slugs for subdocs to work but I get an error, what I currently have is:
import mongoose from 'mongoose'; import URLSlugs from 'mongoose-url-slugs' const Schema = mongoose.Schema; const subTypeSchema = new Schema({ name: {type: 'String', required: false}, }); subTypeSchema.plugin(URLSlugs('name')); const productSchema = new Schema({ name: { type: 'String', required: true }, subtypes: [subTypeSchema], }); productSchema.plugin(URLSlugs('name')); export default mongoose.model('Product', productSchema);
I get the following error:
node_modules/mongoose-url-slugs/index.js:161 model.find(q, fields).exec(function(e, docs) {TypeError: : model.find is not a function
What am I doing wrong?
Node version 7.6.0 MongoDB shell version v3.4.4 Mongoose version ^4.4.20
The text was updated successfully, but these errors were encountered:
Please submit a reproduction, you seem to be using ES6 syntax.
Sorry, something went wrong.
No branches or pull requests
Hi,
I'm trying to get slugs for subdocs to work but I get an error, what I currently have is:
I get the following error:
What am I doing wrong?
Node version 7.6.0
MongoDB shell version v3.4.4
Mongoose version ^4.4.20
The text was updated successfully, but these errors were encountered: