From b526c75161ca0fbf03c0506ac662bdea75718eb6 Mon Sep 17 00:00:00 2001 From: cool Date: Sun, 7 Apr 2024 18:20:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BC=E5=AE=B9=20mariadb=20=20add=20?= =?UTF-8?q?=E5=BC=BA=E5=88=B6=E5=8E=BB=E9=99=A4id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/package.json | 2 +- core/src/package.json | 2 +- core/src/service/base.ts | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/package.json b/core/package.json index 68377e7..41ae7b4 100644 --- a/core/package.json +++ b/core/package.json @@ -1,6 +1,6 @@ { "name": "@cool-midway/core", - "version": "7.1.15", + "version": "7.1.16", "description": "", "main": "dist/index.js", "typings": "index.d.ts", diff --git a/core/src/package.json b/core/src/package.json index 8d94483..fa55cb7 100644 --- a/core/src/package.json +++ b/core/src/package.json @@ -1,6 +1,6 @@ { "name": "@cool-midway/core", - "version": "7.1.15", + "version": "7.1.16", "description": "", "main": "index.js", "typings": "index.d.ts", diff --git a/core/src/service/base.ts b/core/src/service/base.ts index b45d3c4..d1534e6 100644 --- a/core/src/service/base.ts +++ b/core/src/service/base.ts @@ -58,6 +58,7 @@ export abstract class BaseService { async init() { const services = { mysql: this.baseMysqlService, + mariadb: this.baseMysqlService, postgres: this.basePgService, sqlite: this.baseSqliteService, }; @@ -209,6 +210,7 @@ export abstract class BaseService { */ async add(param: any | any[]): Promise { if (!this.entity) throw new CoolValidateException(ERRINFO.NOENTITY); + delete param.id; await this.addOrUpdate(param, "add"); return { id: