delete_entity with TableEntity requires RowKey to be string
When using create_entity or upsert_entity and passing a TableEntity the SDK takes care of converting the property data types. For example, the RowKey could have type UUID. See _add_entity_properties.
delete_entity also offers an overload accepting a TableEntity - but then uses PartitionKey and RowKey directly, raising a TypeError: PartitionKey or RowKey must be of type string. when I use my same object that I pass to create/upsert.
Is this expected behaviour? I can cast to string, but wouldn't it be more consistent if this would be handled by the SDK? 😇
Hi @mtin thanks for the feedback, we'll get back to you asap.
Hi @mtin , thanks for your patience!
We found more issues while working on this one - not only has issue in UUID type, also in other entity's property types like datetime and bytes - after our investigation. And somehow you could pass UUID type to create/upsert operations is actually a "bug", the key types are not expected to be other types except string.
So for this issue, casting to string in your end is a simple work around for now, we will close your PR as it only concentrates on accepting UUID type. Instead, we are thinking about a new design in serialization to resolve issues while dealing with UUID, datetime and bytes types, we'll fix them soon.
Thanks!