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
The services section of Feathers documentations states:
update(id, data, params) -> Promise - replaces the resource identified by id with data. The method should return a Promise with the complete updated resource data. id can also be null when updating multiple records with params.query containing the query criteria.
However, when using feathers-mongoose and calling update(null, data, param) throws
'Not replacing multiple records. Did you mean patch?' exception
Expected behavior
Update call should succeed
Actual behavior
Update call fails with BadRequest
System configuration
Tell us about the applicable parts of your setup.
Module versions (especially the part that's not working): [email protected]
NodeJS version:
8.5.0
Operating System:
Ubuntu 16.04
The text was updated successfully, but these errors were encountered:
This is by design since there isn't a lot of cases where you want to blow away an entire set of data and replace it with the same data. This is also documented in the database adapter specific API:
Does not allow replacing multiple records (id can't be null).
Steps to reproduce
The services section of Feathers documentations states:
However, when using feathers-mongoose and calling update(null, data, param) throws
Expected behavior
Update call should succeed
Actual behavior
Update call fails with BadRequest
System configuration
Tell us about the applicable parts of your setup.
Module versions (especially the part that's not working):
[email protected]
NodeJS version:
8.5.0
Operating System:
Ubuntu 16.04
The text was updated successfully, but these errors were encountered: