Skip to content
This repository has been archived by the owner on Jan 4, 2024. It is now read-only.

Commit

Permalink
Add note about returning falsy value in where clause
Browse files Browse the repository at this point in the history
  • Loading branch information
kiaking committed Aug 19, 2019
1 parent a9f07d8 commit d913c41
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/guide/data/retrieving.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ const user = User.query().where((user) => {
}).get()
```

> **NOTE:** When returning the result of the condition, you must explicitly return a boolean, `true` or `false`. It will not work if you return a falsy value other than `false`, for example, `undefined` or `null`. See [GitHub Issue #402](https://github.com/vuex-orm/vuex-orm/issues/402) for more details.
When passing a closure to the 1st argument, it will also receive query builder as the 2nd argument. By using the query builder, you may nest the where clause. This is useful when you want "group" the where clauses.

```js
Expand Down

0 comments on commit d913c41

Please sign in to comment.