From af1dd954b49bd99e6f87d0b0776fce7026d39766 Mon Sep 17 00:00:00 2001 From: bwgjoseph Date: Thu, 29 Jul 2021 18:01:14 +0800 Subject: [PATCH] fix: _getQuery do not use this.id Without using `this.id`, if the `id` field is defined as other name than `id`, then the query will fail --- src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index f9f82b2..ef242c0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -229,10 +229,10 @@ class OttomanService extends AdapterService implements InternalServi ...restQuery, $and: [ { - id, + [this.id]: id, }, { - id: query[this.id], + [this.id]: query[this.id], }, ], }; @@ -240,7 +240,7 @@ class OttomanService extends AdapterService implements InternalServi return { ...query, - id, + [this.id]: id, }; }