-
- Notifications
You must be signed in to change notification settings - Fork 159
Closed
Labels
Description
var parent = new Parent { Name = "Alice" }; var bob = new Person { Name = "Bob", Parent = parent }; var bill = new Person { Name = "Bill", Parent = parent }; context.Parents.Add(parent); context.People.Add(bob); context.People.Add(bill); context.SaveChanges();
GET /api/v1/people?include=parent HTTP/1.1 Host: localhost:5000
returns duplicate entries for Alice
in the included document:
{ "data": [ ... ], "included": [ { "type": "parents", "id": "3", "attributes": { "name": "Alice" }, "relationships": { "people": { "links": { "self": "http://localhost:5000/api/v1/parents/3/relationships/people", "related": "http://localhost:5000/api/v1/parents/3/people" } } } }, { "type": "parents", "id": "3", "attributes": { "name": "Alice" }, "relationships": { "people": { "links": { "self": "http://localhost:5000/api/v1/parents/3/relationships/people", "related": "http://localhost:5000/api/v1/parents/3/people" } } } } ] }
Investigation:
Thanks @grw300 for reporting this!