You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PATCH against a complex typed property is currently being handled with PUT semantics -- properties not specified in the payload are being set to null, where they should be left untouched.
Only the Region of the City property should be changed to "CA"; the rest of the payload should remain unchanged.
Actual result
The other properties of Location are set to null:
{
"@odata.context":"http://services.odata.org/TripPinRESTierService/$metadata#Airports/$entity",
"Name":"Los Angeles International Airport",
"IcaoCode":"KLAX",
"IataCode":"LAX",
"Location":{
"Address":"1 World Way, Los Angeles, CA, 90045",
"City":{
"Name":null,
"CountryRegion":null,
"Region":"CA"
},
"Loc":null
}
}
@mirsking I merge the PR to build new release. Help to update the hosted sample services on odata.org and sample services in odatasamples git repository.
PATCH against a complex typed property is currently being handled with PUT semantics -- properties not specified in the payload are being set to null, where they should be left untouched.
Reproduce steps
PATCH http://services.odata.org/TripPinRESTierService/(S(h0jbxldzeiopthtrxz5zzme5))/Airports('KLAX')
{
"Location":{
"Address":"1 World Way, Los Angeles, CA, 90045","City":{
"Region":"CA"
}
}
}
Expected result
Only the Region of the City property should be changed to "CA"; the rest of the payload should remain unchanged.
Actual result
The other properties of Location are set to null:
{
"@odata.context":"http://services.odata.org/TripPinRESTierService/$metadata#Airports/$entity",
"Name":"Los Angeles International Airport",
"IcaoCode":"KLAX",
"IataCode":"LAX",
"Location":{
"Address":"1 World Way, Los Angeles, CA, 90045",
"City":{
"Name":null,
"CountryRegion":null,
"Region":"CA"
},
"Loc":null
}
}
Additional details
PATCH http://services.odata.org/TripPinRESTierService/(S(h0jbxldzeiopthtrxz5zzme5))/Airports('KLAX')
{
"Name":"Los Angeles International Airport"
}
Correctly only updates the Name property; the problem only appears if the payload contains a subset of the properties of a complex type.
The text was updated successfully, but these errors were encountered: