Skip to content

Commit

Permalink
fix: _getQuery do not use this.id
Browse files Browse the repository at this point in the history
Without using `this.id`, if the `id` field is defined as other name than `id`, then the query will fail
  • Loading branch information
bwgjoseph committed Jul 29, 2021
1 parent a4de57c commit af1dd95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,18 +229,18 @@ class OttomanService<T = any> extends AdapterService<T> implements InternalServi
...restQuery,
$and: [
{
id,
[this.id]: id,
},
{
id: query[this.id],
[this.id]: query[this.id],
},
],
};
}

return {
...query,
id,
[this.id]: id,
};
}

Expand Down

0 comments on commit af1dd95

Please sign in to comment.