From 670f97146dd3f7fe0a0276fbe1f60c3a9b3b6953 Mon Sep 17 00:00:00 2001 From: 2881099 <2881099@qq.com> Date: Tue, 12 Nov 2024 14:47:27 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E4=BF=AE=E5=A4=8D=20GBase=20=E5=AF=B9=20bi?= =?UTF-8?q?gserial=20=E8=87=AA=E5=A2=9E=E9=97=AE=E9=A2=98=EF=BC=9B#1919?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Providers/FreeSql.Provider.GBase/Curd/GBaseInsert.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Providers/FreeSql.Provider.GBase/Curd/GBaseInsert.cs b/Providers/FreeSql.Provider.GBase/Curd/GBaseInsert.cs index c3b2b9716..dd0c93928 100644 --- a/Providers/FreeSql.Provider.GBase/Curd/GBaseInsert.cs +++ b/Providers/FreeSql.Provider.GBase/Curd/GBaseInsert.cs @@ -49,8 +49,8 @@ protected override long RawExecuteIdentity() { if (identityType == typeof(int) || identityType == typeof(uint)) identitySql = "SELECT dbinfo('sqlca.sqlerrd1') FROM dual"; else if (identityType == typeof(long) || identityType == typeof(ulong)) identitySql = - identityCol.Attribute.DbType.IndexOf("bigserial", StringComparison.OrdinalIgnoreCase) != -1 ? - "SELECT dbinfo('bigserial') FROM dual" : "SELECT dbinfo('serial8') FROM dual"; + identityCol.Attribute.DbType.IndexOf("bigserial", StringComparison.OrdinalIgnoreCase) != -1 ? + "SELECT dbinfo('bigserial')::INT8 FROM dual" : "SELECT dbinfo('serial8') FROM dual"; } var before = new Aop.CurdBeforeEventArgs(_table.Type, _table, Aop.CurdType.Insert, string.Concat(sql, $"; {identitySql};"), _params); _orm.Aop.CurdBeforeHandler?.Invoke(this, before);