Skip to content

Commit

Permalink
[enhancement] updateOneSql support typeHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
VampireAchao committed May 30, 2023
1 parent 6a71b74 commit fa4f6cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ private String buildCaseWhen(TableInfo tableInfo) {
String.format(
WHEN_THEN,
safeKeyProperty,
SqlScriptUtils.safeParam(ENTITY_DOT + i.getProperty())),
SqlScriptUtils.safeParam(ENTITY_DOT + i.getEl())),
String.format(WHEN_THEN, safeKeyProperty, i.getColumn())),
COLLECTION_PARAM_NAME,
null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import lombok.SneakyThrows;
import lombok.val;
import org.apache.ibatis.session.SqlSessionFactory;
import org.dromara.streamquery.stream.core.collection.Lists;
import org.dromara.streamquery.stream.core.lambda.function.SerSupp;
import org.dromara.streamquery.stream.plugin.mybatisplus.engine.handler.AbstractJsonFieldHandler;
import org.junit.jupiter.api.Assertions;
Expand Down Expand Up @@ -59,7 +60,8 @@ void test() {
});
}
};
Database.save(user);
Database.saveFewSql(Lists.of(user));
Database.updateFewSql(Lists.of(user));
val dbUser = Database.getById(user.getId(), UserInfoWithJsonName.class);
Assertions.assertEquals("VampireAchao", dbUser.getName().getUsername());
Assertions.assertEquals("阿超", dbUser.getName().getNickname());
Expand Down

0 comments on commit fa4f6cf

Please sign in to comment.