Closed nickygb closed 5 years ago
I'm trying to use batch query update but I cannot make it update all the items from the parameters array:
If I have machine (id 7501) with name: 'machine7501' and machine (id 7502) with name: 'machine7502' and run the following query
await this.dataApiClient.query( `UPDATE machine SET ${Object.keys(machine).map(key => `${key}=:${key}`)} WHERE id=:id`, [ [{ id: 7501, name: 'new_machine7501', }], [{ id: 7502, name: 'new_machine7502', }], ], );
I expect to both names to be updated (new_machine7501 and new_machine7502) respectively but the query only update the machine with 7501.
Sorry is the same as #5
I'm trying to use batch query update but I cannot make it update all the items from the parameters array:
If I have machine (id 7501) with name: 'machine7501' and machine (id 7502) with name: 'machine7502' and run the following query
I expect to both names to be updated (new_machine7501 and new_machine7502) respectively but the query only update the machine with 7501.