You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Note:**_this is more for backwards compatibility. We recommend the usage of hooks as they are easier to test, easier to maintain and are more flexible._
220
220
221
221
222
+
## Migrating
223
+
224
+
Version 3 of this adapter no longer brings its own Mongoose dependency, only accepts mongoose models and doesn't set up a database connection for you anymore. This means that you now need to make your own mongoose database connection and you need to pass in mongoose models changing something like
225
+
226
+
```js
227
+
var MySchema =require('./models/mymodel')
228
+
var mongooseService =require('feathers-mongoose');
Mongoose by default gives you the ability to add [validations at the model level](http://mongoosejs.com/docs/validation.html). Using an error handler like the [middleware that comes with Feathers](https://github.com/feathersjs/generator-feathers/blob/master/app/templates/src/middleware/error-handler.js) your validation errors will be formatted nicely right out of the box!
0 commit comments