Skip to content

Instantly share code, notes, and snippets.

@albertorestifo
Created October 6, 2021 10:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save albertorestifo/ca5a4beb2f89d1c3151cf16833dd1068 to your computer and use it in GitHub Desktop.
Save albertorestifo/ca5a4beb2f89d1c3151cf16833dd1068 to your computer and use it in GitHub Desktop.
- return this.prisma.ctrPayrollCompensation.create({
- data: createData,
+ return this.prisma.ctrPayrollCompensation.upsert({
+ where: { idepotencyKey }
+ create: { ...createData, idepotencyKey },
+ update: {},
include: {
rateOfPayUnit: true,
cycle: { include: { recurringFrequency: true, recurringPatterns: true } },
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment