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

Filtering null relationships is not possible #271

Closed
timsuchanek opened this issue Oct 28, 2019 · 0 comments
Closed

Filtering null relationships is not possible #271

timsuchanek opened this issue Oct 28, 2019 · 0 comments
Assignees
Labels
bug/2-confirmed We have confirmed that this is a bug. kind/bug A reported bug.
Milestone

Comments

@timsuchanek
Copy link
Contributor

Schema

model User {
  id Int @id
  address Address?
}

model Address {
  id Int @id
}

Code

const usersWithoutAddress = await photon.users.findMany({
  where: {
    address: null
  }
})

This generates an incorrect query under the hood with querying address: {} instead of address: null.

@timsuchanek timsuchanek added bug/2-confirmed We have confirmed that this is a bug. kind/bug A reported bug. process/candidate Candidate for next Milestone. labels Oct 28, 2019
@timsuchanek timsuchanek self-assigned this Oct 28, 2019
@janpio janpio added this to the Preview 16 milestone Oct 28, 2019
@janpio janpio removed the process/candidate Candidate for next Milestone. label Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug/2-confirmed We have confirmed that this is a bug. kind/bug A reported bug.
Projects
None yet
Development

No branches or pull requests

2 participants