How can I view a record's original data during an ...
# prisma-client
y
How can I view a record's original data during an interactive transaction?
Copy code
prisma.$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;
});
l
I'm not aware of such functionality. As far as I know,
update
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
y
Thank you!!