Open svrooij opened 4 months ago
@svrooij I am investigating this and will share an update on this shortly.
The code path which handles output binding data uses Newtonsoft.Json.Linq.JObject
type to hold the data while passing it through different layers before building a TableEntity
class instance which will be used to write it to the Azure table resource.
The code tries to read the JObject
property value as JValue which stores the numeric value as long
(int64
)
So yes, this is a current limitation. In cases like more fine grained control, we recommend you using the TableClient directly to create the table entity.
@kshyju how can you complete a still existing issue? Either update the docs to document this issue or fix the actual issue.
Closing this issue with "So yes, this is a current limitation" is a very bad experience!
The code path which handles output binding data uses
Newtonsoft.Json.Linq.JObject
type
And this statement, makes me wonder when Microsoft will truly migrate to System.Text.Json
@svrooij Sorry! I agree this should not be closed. I am re-opening it to track the work needed to make possible improvements in this case.
Description
It seems that there is some issue with saving a poco in tablestorage. An int gets stored as an Int64 and cannot be read back because (off course) an Int64 cannot be converted to an int.
https://github.com/Azure/azure-sdk-for-net/issues/43443
Steps to reproduce
Here is a reproduction code which you can try yourself. https://github.com/svrooij/long-overdue-int-erubtion
GET /api/CreateItem
endpointGET /api/GetItemById/{id}
(will not work)GET /api/CreateItemWithClient
endpointGET /api/GetItemById/{id}
(will work)