How to query for is:{null} OR {something: true}
When I want to update a record in a table, for the
where
I need to query for a related object and I need to say if the related object does not exist (is null) or a property on the related object is something
psudo code
but the OR
does not allow me to put is
in it...4 Replies
Hey 👋
In your case, is lastMessage a relation field of is it a composite type?
Do you mind sharing the channel model so that I can better understand your usecase?
Composite types | Prisma Documentation
Composite types
Assuming this model:
This query works for me:
Ohhh yea I was dumb. Thank you.
No worries! I am glad to be able to help 🙂