且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

存储过程azure Cosmos DB返回空集合

更新时间:2023-02-14 12:16:10

我有类似的问题。我认为当分区键一个字符串时,Azure门户不会正确执行存储过程。

I had a similar issue. I think the Azure portal doesn't execute stored procedures properly when the partition key is not a string.

在我的情况下,我有一个partitionKey这是一个数字。当我通过门户网站执行存储过程时,我总是得到一个空的resultSet,即使我的数据库中有文档。当我稍微更改结构,并使我的partitionKey成为一个字符串时,存储过程工作正常。

In my case I had a partitionKey that is a number. When I executed the stored procedure via the portal I always got an empty resultSet, even though I had documents in my database. When I changed the structure a little, and made my partitionKey a string, the stored procedure worked fine.