Skip to content

Commit 7e43d63

Browse files
committed
refactor: 优化
1 parent 52b93a7 commit 7e43d63

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

hsweb-easy-orm-rdb/src/main/java/org/hswebframework/ezorm/rdb/executor/reactive/r2dbc/R2dbcReactiveSqlExecutor.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,14 @@ protected Statement prepareStatement(Statement statement, SqlRequest request) {
252252
if (parameter == null) {
253253
bindNull(statement, index, String.class);
254254
} else if (parameter instanceof NullValue nullValue) {
255-
bindNull(statement, index, nullValue.getType());
255+
Class<?> javaType = nullValue.getType();
256+
if (javaType == LongCharSequence.class) {
257+
// 空字符,批量保存时,有的数据库不同行不能有的设置null有的不设置.
258+
bindNull(statement, index, Clob.class);
259+
}else {
260+
bindNull(statement, index, javaType);
261+
}
262+
256263
} else {
257264
// convert clob
258265
if (parameter instanceof LongCharSequence cb) {

0 commit comments

Comments
 (0)