fix query upsert
This commit is contained in:
@@ -98,7 +98,9 @@ export const execQuery = async (args: DBArg, prisma: any) => {
|
|||||||
const where = {} as any;
|
const where = {} as any;
|
||||||
for (const pk of pks) {
|
for (const pk of pks) {
|
||||||
where[pk.name] = item[pk.name];
|
where[pk.name] = item[pk.name];
|
||||||
|
delete item[pk.name];
|
||||||
}
|
}
|
||||||
|
|
||||||
transactions.push(
|
transactions.push(
|
||||||
prisma[table].update({ data: item, where })
|
prisma[table].update({ data: item, where })
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user