Cannot apply PATCH to navigation property 'x' on entity type t. #964

Open
egbertn opened this Issue Apr 12, 2017 · 3 comments

Comments

Projects
None yet
4 participants
@egbertn

egbertn commented Apr 12, 2017

Short summary (3-5 sentences) describing the issue.

Assemblies affected

Which assemblies and versions are known to be affected e.g. OData .Net lib 6.15-beta.
Microsoft.AspNet.OData.6.0.0

Reproduce steps

The simplest set of steps to reproduce the issue. If possible, reference a commit that demonstrates the issue.
use Fiddler to patch this e.g.
PATCH /odata/mycontroller(a1bf5fc5-001d-416f-bf97-8f41cdb8cb3e)
{
name:"Piet Puk",
"technologies" : [{
"constant_type" : 17,
"id" : "91f57d80-3e12-4450-8865-21d4dd8d5cdb"
}, {
"constant_type" : 17,
"id" : "678e8f16-33f1-427d-99bd-9f1ad45793e2"
}, {
"constant_type" : 17,
"id" : "ad4db3f3-6183-404d-99d2-d4bbb7268806"
}
]
}

server side code:
public async Task Patch(Guid key, System.Web.OData.Delta<company> delta)

Expected result

What would happen if there wasn't a bug.
ModelState.IsValid == true

Actual result

What is actually happening.
ModelState.IsValid == false
Cannot apply PATCH to navigation property 'technologies' on entity type t.

Additional details

Optional, details of the root cause if known. Delete this section if you have no additional details to add.

You have fixed this issue (see issue 135) on OData 5.9.x but 6.0 was not fixed.

@AndreJacomeSilva

This comment has been minimized.

Show comment
Hide comment
@AndreJacomeSilva

AndreJacomeSilva May 18, 2017

Hi,
We have confirm this bug patching an entity with children's.

When do you expect to have this issue fixed? Since it was already fixed on the previous version (OData 5.9) it should be easy to apply to the new version.

Best regards,
André Silva

Hi,
We have confirm this bug patching an entity with children's.

When do you expect to have this issue fixed? Since it was already fixed on the previous version (OData 5.9) it should be easy to apply to the new version.

Best regards,
André Silva

@egbertn

This comment has been minimized.

Show comment
Hide comment
@egbertn

egbertn May 18, 2017

The product goes MVP next week, but it will be live in 2 months.
Within that range please? :)
(I can live with it because I have a workaround for now)

egbertn commented May 18, 2017

The product goes MVP next week, but it will be live in 2 months.
Within that range please? :)
(I can live with it because I have a workaround for now)

@omric-axonize

This comment has been minimized.

Show comment
Hide comment
@omric-axonize

omric-axonize Dec 26, 2017

Any news for this issue?

Any news for this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment