Yaakov
03/27/2022, 7:05 PMprisma.$transaction(async (prisma) => {
const user = await prisma.user.update({
where: {
id: 1,
},
data: {
name: 'Bob'
},
});
// How can I view the user's original name before the current update?
return user;
});
Lukáš Stuchlík
03/29/2022, 6:43 AMupdate
returns the new updated version, so I think if you want to view the user's original name, you might have to find
him separately before the update
Yaakov
03/29/2022, 3:22 PM