-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
LB4 todo-list example gives Error: Property "todoListId" cannot be changed! #2658
Comments
When you're trying to do a So I created your {
"id": 0,
"title": "sample todo",
"desc": "sample description",
"isComplete": false
} To which I received the following response body (and a 200 status code): {
"id": 5,
"title": "sample todo",
"desc": "sample description",
"isComplete": false,
"todoListId": 3
} I believe when you add the I'm thinking we can add this information to the documentation, specifically the HasMany relation page, what do you think? |
Acceptance Criteria
|
@b-admike will look to see if there is an existing bug related to the |
Most people don't read docs. Can we instead fix the constraint check to recognize the situation where the requested data is not changing the immutable key and don't report a false error? |
@b-admike if you can find the issue that's related to that check, we can close this issue. Otherwise, we can modify this issue to fix the constraint instead of the docs (or close this one and open a new issue). |
I think the problem is has been described here first: #1719 |
I have cloned the project using cli "lb4 example todo-list" without modifying anything.
After I Inserted new record to "todo-list" model, I got the response.
{ "id": 3, "title": "newToDoList", "color": "red" }
then I use id = 3 as an input for
POST /todo-lists/{id}/todos
.I also try to create the relation model myself following the example.
https://loopback.io/doc/en/lb4/HasMany-relation.html
But it also give the same error.
The text was updated successfully, but these errors were encountered: