Skip to content
New issue

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

add model to find the bug of #1976 #1

Open
wants to merge 1 commit into
base: UpdateById
Choose a base branch
from

Conversation

zealseeker
Copy link

The bug strongloop/loopback#1976 still exists when using relation model to modify a data.
I added an "auser" model which hasMany test. I created a user whose username and password are '123'.
You'd better change the access of User model to make sure the access to auser model. (I changed the node_modules/loopback/common/models/user.json : $everyone permission from DENY to ALLOW )
Do these :

  1. add a data from the API of POST /ausers/{id}/test, whose auserId is 1 and data is {"name1":"another"}
  2. modify the data from the API of PUT /ausers/{id}/test/{fk} ,whose auserId is 1 , fk is 2 (1 is the data u added in origin) and data is {"name2":"whatever"}
  3. you will find that the the name1 will be myDefault automatically with the corresponding log file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant