Reputation: 519
I am using Azure Table Storage Rest Api to Update the entity. If the entity has 5 columns(col1,col2,col3,col4,col5) and I am making a PUT request body something like this.
{"col1":"value"}
The rest of the columns value is set to NULL.
Is there a way to avoid it?
Upvotes: 0
Views: 864
Reputation: 136196
The reason you're seeing this behavior is because you're performing Update Entity
operation which will replaces an entire entity.
If you're only interested in changing just one attribute (property), you need to use Merge Entity
operation which updates an existing entity by updating the entity's properties. It does not replace the existing entity.
Simply changing your HTTP Request method to MERGE
from PUT
should do the trick.
Upvotes: 2