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