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
I used the example of readme file, and after the server starts I got the error ReferenceError: Schema is not defined
static schema () { return { username: String, childs: [{ type: Schema.ObjectId, ref: 'UserSchema' }], email: { type: String, type: String, required: true, unique: true, lowercase: true, trim: true, validate: { validator: function (val) { return isEmail(val) }, message: '{VALUE} is not a valid email' } } } }
apparently the scope of the schema variable, has been lost
The text was updated successfully, but these errors were encountered:
@cesar2064 Yep Schema is default Schema from mongoose. You could add it using
Schema
const Schema = require('mongoose').Schema;
Sorry, something went wrong.
Ok thanks, @konstantinzolotarev resolved my problem. I think you should update the trailpack-mongoose example.
No branches or pull requests
I used the example of readme file, and after the server starts I got the error ReferenceError: Schema is not defined
apparently the scope of the schema variable, has been lost
The text was updated successfully, but these errors were encountered: