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
When using the lastest version of feathers the custom id option doesn't seem to work anymore
const createService = require("feathers-mongoose"); const createModel = require("../../models/page.model"); const hooks = require("./page.hooks"); const filters = require("./page.filters"); module.exports = function() { const app = this; const Model = createModel(app); const paginate = app.get("paginate"); const options = { name: "page", id: "slug", Model, paginate }; // Initialize our service with any options it requires app.use("/page", createService(options)); // Get our initialized service so that we can register hooks and filters const service = app.service("page"); service.hooks(hooks); if (service.filter) { service.filter(filters); } };
this just gives the error
Cast to ObjectId failed for value "story" at path "_id" for model "page"
The text was updated successfully, but these errors were encountered:
This is because of an update on Mongoose. had the same Issue.
https://github.com/Automattic/mongoose/blob/master/History.md#4101--2017-05-21
"fix(schema): enforce that _id is never null #5236"
Just lock you Mongoose to v4.10.0 and should work.
v4.10.0
Sorry, something went wrong.
No branches or pull requests
When using the lastest version of feathers the custom id option doesn't seem to work anymore
this just gives the error
The text was updated successfully, but these errors were encountered: