diff --git a/packages/nocodb/src/lib/db/sql-client/lib/oracle/OracleClient.ts b/packages/nocodb/src/lib/db/sql-client/lib/oracle/OracleClient.ts index 98f55eb64e..7db5dcf0a4 100644 --- a/packages/nocodb/src/lib/db/sql-client/lib/oracle/OracleClient.ts +++ b/packages/nocodb/src/lib/db/sql-client/lib/oracle/OracleClient.ts @@ -483,7 +483,8 @@ class OracleClient extends KnexClient { seq.sequence_name, CASE WHEN seq.sequence_name IS NOT NULL - AND p.constraint_type = 'P' THEN 1 + AND p.constraint_type = 'P' THEN 1 + WHEN c.IDENTITY_COLUMN = 'YES' THEN 1 ELSE 0 END as ai, c.table_name as tn, diff --git a/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts b/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts index 5ac240bc74..3532e43572 100644 --- a/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts +++ b/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts @@ -1607,9 +1607,7 @@ class BaseModelSqlv2 { if (this.isSqlite || this.isOracle) { // sqlite doesnt return id after insert id = ( - await this.dbDriver(this.tnPath) - .select(ai.column_name) - .max(ai.column_name, { as: 'id' }) + await this.dbDriver(this.tnPath).max(ai.column_name, { as: 'id' }) )[0].id; } else if (this.isSnowflake) { id = (