mattttman
WWasp-lang
•Created by mattttman on 3/9/2024 in #đŸ™‹questions
Update DB Field using Another Field
Hi! I'm looking for a way to update a database value by referencing the value of another field. See example below. It appears that this exists in standalone Prisma- is there a way to do it in wasp?
context.entities.User.updateMany({
where: {
// Something
},
data: {
credits: { set: context.entities.User.creditAllowance
}
}
2 replies