Mickaël Oth
05/05/2020, 1:54 PM{ id: 1, workspace: 1 }
, but got an error because we can only update where with "UniqueInput" keys. I guess this is not a bug but a choice, but is there any workaround to do what I want ?Martina Helene Welander
05/05/2020, 2:23 PMupdateMany
. I can't think of a reason why it would be an issue apart from the fact that you get a count of changed records back and not a the updated record:
const changedCount = await prisma.user.updateMany({
data: {
name: "New name",
},
where: {
id: 2,
workspace: 10
},
});
(Prisma 1 has updateMany* as well, it seems)Mickaël Oth
05/05/2020, 2:27 PMcount: 1
. I'm a little borring (😁), but is there any possibility to get the complete entity updated ?Martina Helene Welander
05/05/2020, 2:38 PMfindOne
query after the update returns.Mickaël Oth
05/05/2020, 2:40 PMMartina Helene Welander
05/05/2020, 2:42 PMRanjan Purbey
05/05/2020, 5:24 PM