Short summary (3-5 sentences) describing the issue.
Which assemblies and versions are known to be affected e.g. OData .Net lib 6.15-beta.
Microsoft.AspNet.OData.6.0.0
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
What would happen if there wasn't a bug.
ModelState.IsValid == true
What is actually happening.
ModelState.IsValid == false
Cannot apply PATCH to navigation property 'technologies' on entity type t.
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.
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
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)
Any news for this issue?
Is there an update on this?
I'm looking to Patch/Put against nested entities on ASP.Net Core using OData and it currently fails for me.
I do have this on .NET Core but it is not yet a neat package. I will look into this this week.
Dudes, I create a package,
https://www.nuget.org/packages/ADCCure.ODataDelta
This should relieve some of the Delta pain, but it still uses Newtonsoft to deserialize, basically, it is not full compatible with the EDM Model to deserialize. Though, for simple patch documents, it works.
I was running into a similar problem, where I have an entity with many properties which are a reference to other entities (not exposed as resources), but for all of them what I wanted to expose is just a "simplified object" with Id and Description, like that:
{
// [other props]
"prop1": { "id": 10, "description": "Aaa" },
"prop2": { "id": 20, "description": "Bbb" }
}
Thus, since I wanted those properties to be interpreted as Complex Objects instead of Navigation Properties (which is automatically interpreted by OData as so when the object has a public int Id { get; set; }), what I had to do is just register the property as a Complex Object, as below:
builder.ComplexType<..>
(Thanks @xuzhg for helping out with that).
Most helpful comment
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