Skip to content

What is the correct way of filtering by a nullable property? #608

Answered by raddevon
brielov asked this question in Q&A
Discussion options

You must be logged in to vote

Use exists:

const query = e.select(e.Post, (post) => ({
  title: true,
  filter: e.op('exists', post.published_at)
})

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@brielov
Comment options

@raddevon
Comment options

Answer selected by brielov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants