dotnetcore / dotnetcore/FreeSql

InsertValueSql 指定序列时,无法使用 InsertOrUpdate

Open
#2,161 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
4.4k
Forks
910
PR merge metrics
No merged PRs in 30d

Description

#### 问题描述及重现代码:
指定InsertValueSql为序列后,执行 InsertOrUpdate 生成的 merge 语句语法错误

报错原因:
在USING语句中不能使用序列

```c#
[Table(Name = "HK_EVENTDATA")]
public class HikVisionEventData
{
[Column(IsPrimary = true, IsIdentity = true, InsertValueSql = "SEQ_HK_EVENTDATA.NEXTVAL")]
public long Id { get; set; }

public string EventId { get; set; }
}

_fsql.InsertOrUpdate()
.SetSource(entityList, it => it.EventId)
.IfExistsDoNothing()
.ExecuteAffrowsAsync(stoppingToken);

```

#### 数据库版本
oracle

#### 安装的Nuget包
FreeSql 3.5.209
FreeSql.Provider.Oracle 3.5.209
#### .net framework/. net core? 及具体版本
.net 8

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.