Loopback: Put method to update a single field deletes the unspecified fields and ask for required fields.

Created on 9 Apr 2018  路  2Comments  路  Source: strongloop/loopback

When i use the PUT method in any model, the method ask to fill the required fields and updated to null value the unspecified fields, (similar behavior to a POST method). Can麓t update a single field!

Description/Steps to reproduce

Get method:
get
PUT:
32
Response.
response

Another case is the deletion of unspecified fields

GET:
testsswss

PUT:
ukkyuk

PUT response:
response2

GET method again:

errrase

Expected result

The expected result is a response with the updated field without modify the unspecified fields.

Most helpful comment

Nvm the solution is use the update operation and make the where statement :)

cddsffsdfs

All 2 comments

Nvm the solution is use the update operation and make the where statement :)

cddsffsdfs

@OscarVargasG , nice!
Closing this issue as resolved. Thanks.

Was this page helpful?
0 / 5 - 0 ratings