Browse Source

Merge pull request #7015 from nocodb/fix/new-data-api-insert

fix: New data api(v2) insert method bug
pull/7023/head
Pranav C 10 months ago committed by GitHub
parent
commit
7da9cb9352
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      packages/nocodb/src/db/BaseModelSqlv2.ts

4
packages/nocodb/src/db/BaseModelSqlv2.ts

@ -3032,7 +3032,7 @@ class BaseModelSqlv2 {
// insert one by one as fallback to get ids for sqlite and mysql
if (insertOneByOneAsFallback && (this.isSqlite || this.isMySQL)) {
// sqlite and mysql doesnt support returning, so insert one by one and return ids
// sqlite and mysql doesn't support returning, so insert one by one and return ids
response = [];
const aiPkCol = this.model.primaryKeys.find((pk) => pk.ai);
@ -5404,7 +5404,7 @@ export function _wherePk(primaryKeys: Column[], id: unknown | unknown[]) {
}
}
return id;
return where;
}
const ids = Array.isArray(id) ? id : (id + '').split('___');

Loading…
Cancel
Save