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
VERSIONS Trailpack-mongoose: 2.1.0 Trailpack-express: 2.0.3 Trailpack-footprints: 2.0.0,
DETAIL Follow documentation on Trailpack-mongoose and Mongoose itself. If we want to declare relationship between one-to-many. We can do as follow:
static schema (app, Mongoose) { return { childs: [{ type: Mongoose.Schema.ObjectId, ref: 'UserSchema' }], } }
But I always get errors to
Error: No such reference exist at FootprintService.createAssociation
When I try make a request to /user/:id/childs
/user/:id/childs
It works only I update the User schema to
childs: { type: [ Mongoose.Schema.ObjectId ], ref: 'UserSchema' }
Do we have different convention with mongoose when declare relationship one-to-many?
The text was updated successfully, but these errors were encountered:
@hoangzinh To be honest I never used such definition. Sorry for that. I'll push a fix asap
Sorry, something went wrong.
87579f9
No branches or pull requests
VERSIONS
Trailpack-mongoose: 2.1.0
Trailpack-express: 2.0.3
Trailpack-footprints: 2.0.0,
DETAIL
Follow documentation on Trailpack-mongoose and Mongoose itself. If we want to declare relationship between one-to-many. We can do as follow:
But I always get errors to
When I try make a request to
/user/:id/childs
It works only I update the User schema to
Do we have different convention with mongoose when declare relationship one-to-many?
The text was updated successfully, but these errors were encountered: