is there a findOrcreate method in Prisma ? Appare...
# orm-help
n
is there a findOrcreate method in Prisma ? Apparently prisma doesn't have a findOrCreate, but rather passing an empty object to the update property in upsert. A decision hasn't been reached yet on this issue https://github.com/prisma/docs/issues/640 , because I can't find any upsert example in the docs that uses an empty update object, or a findOrCreate section. Please fix @Joël
r
This can be easily done using
upsert
and specifying an empty object in update as you have specified above.
n
@Ryan yes , but it isn't in the docs. I rather found it in GitHub issues.
r
We will add this to the docs 🙂