I have a component with ODataAdaptor as a data source, now i would like to make a Patch request with $expand query like i make for GET request(since GET request openly supports $expand query). But i don't have an idea whether it is accepted or is there any other way i can look into to approach this issue?
Actual request: http://localhost:49807/odata/Orders(10249)
Expected request: http://localhost:49807/odata/Orders(10249)/?$expand=OrderDetail($select=CustomerID)
with $expand query in Patch request.
You can't easily Patch to nested properties, this is well documented restriction. However if you want to patch a single object, and return a result with the expanded path you have suggested then there are two simple steps to achieve this:
[EnableQuery]
attribute to your Patch endpoint method.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With