-
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
TodoList tutorial - GET /todos/{id}/todo-list gives unexpected response #4147
Comments
@emonddr, I've followed the todo list tutorial and reproduced the problem. For the
I think we didn't cover that
To clarify your point, I think the generated code shows:
but in the example code, it has:
The generated code seems to work fine, but it would be good if we have both places consistent. Perhaps @nabdelgadir or @agnes512 can comment on that?
Does it make sense to make the id field auto-generated for both cases?
|
Hmm. I thought And the main problem in |
For 2, I think the issue here is the generated code is different from the code in the examples/todo-list package. |
Even specifying GET /todos/{todo id}/todo-list ; where todo id =1 (not part of a todo list) |
@bajtos , are the navigational properties for |
The navigational properties will be filled by For now, users have to fill the interface entries manually. |
Personally, I'd prefer to make the ID always generated by the database (property defined with |
Adding the navigational properties by hand to to the Todo and TodoList models doesn't fix the bug I am seeing. |
There seems to be more than one issue captured in this ticket. I'd like to propose:
@emonddr , could you please create a new ticket for #2? Thanks. |
This is a stretch goal for Q4. Could you please:
|
I have moved the conversation of the differences between the This issue is now only about the problem described in the Description. |
TodoList tutorial - GET /todos/{id}/todo-list gives unexpected response
for a todo item that is not part of a todo list.
Current Behavior
In the
Todo tutorial
, a few todo items are already inside db.json.They are not associated with any list.
No problem.
I reach the end of the
TodoList tutorial
I create a TodoList #1
I add two new todo items to it.
No problem.
When I use
GET /todos/{todo id}/todo-list
for the two new todo items (id=5 or 6) above, I get theproper response of
No problem.
But when I use
GET /todos/{todo id}/todo-list
for the any item items (id=1 through 4) above (not associated with a list), I get theunexpected response
of:todo with id=1 is not part of todoList id=1.
Expected Behavior
Expected a response of
[ ]
.Link to reproduction sandbox
Related Issues
See Reporting Issues for more tips on writing good issues
Acceptance Criteria
The text was updated successfully, but these errors were encountered: