The current upsert offered by Prisma has a race condition (#3242). It would be optimal if at least the Postgres/Mysql/Mongodb drivers used the database's native upsert to avoid that.
Originally posted by @windowsdeveloperwannabe in #8134 (comment)
SELECT then INSERT causes race conditions. Postgres has native support for upsert. It's surprising that prisma has a function explicitly named upsert() that doesn't use this feature.
Originally posted by @windowsdeveloperwannabe in #8134 (comment)
SELECT then INSERT causes race conditions. Postgres has native support for upsert. It's surprising that prisma has a function explicitly named
upsert()that doesn't use this feature.