Is there any place to read up on how upserts are i...
# orm-help
a
Is there any place to read up on how upserts are implemented in Prisma? Im running upserts asynchronously and I'm running into issues where the
push
in the update is actually not being consistent. i.e. If I push
1
and
2
, only
1
is in the array
Copy code
items.map((item) =>
  table.upsert({
    where: {
      id: item.id,
    },
    create: {
      id: item.id,
      relatedIds: [item.relatedId],
    },
    update: {
      relatedIds: {
        push: item.relatedId,
      },
    },
  })
);
👀 1
a
Hey there! Could you provide your full schema and relevant code so I can try to reproduce this? If I can, it is a bug and we will file a bug report.
👍 1
v
👋 hey @Avery Yip! Did you have a chance to see Austin's comment? Let us know if you still have any issues!