0

我有一个发电机数据库模式可以说是这样的

const team = new dynamoose.Schema(
  {
   bitbucketDetails: [
      {
        id: {
          type: String,
          required: true,
        },
        repository: {
          type: String,
        },
      
      },
    ],
})

我想搜索一个可以说特定存储库“abc”的项目。我该如何搜索?

到目前为止,我尝试了类似 team.scan({ bitbucketDetails: { contains:"abc" }}).all().exec() 但一直说 ValidationException:一个或多个参数值无效:ComparisonOperator CONTAINS 对 M 无效属性值类型。

请帮忙!!

4

1 回答 1

0

您正在查找 bitbucketDetails 中的值,但您想查看 bitbucketDetails.repository。

于 2020-12-06T13:22:13.177 回答