From 36ed6c52faf76fff282a65d00baf6cc28abd659b Mon Sep 17 00:00:00 2001 From: Suomm <1474983351@qq.com> Date: Wed, 23 Aug 2023 22:00:38 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E6=B5=8B=E8=AF=95=20left=20join=20?= =?UTF-8?q?=E5=85=B3=E8=81=94=E6=9B=B4=E6=96=B0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/mybatisflex/test/UpdateChainTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mybatis-flex-test/mybatis-flex-native-test/src/main/java/com/mybatisflex/test/UpdateChainTest.java b/mybatis-flex-test/mybatis-flex-native-test/src/main/java/com/mybatisflex/test/UpdateChainTest.java index f1e13e48..1ca3b145 100644 --- a/mybatis-flex-test/mybatis-flex-native-test/src/main/java/com/mybatisflex/test/UpdateChainTest.java +++ b/mybatis-flex-test/mybatis-flex-native-test/src/main/java/com/mybatisflex/test/UpdateChainTest.java @@ -65,8 +65,8 @@ public class UpdateChainTest { @Test public void testUpdateChain() { UpdateChain.of(Account.class) - .set(Account::getUserName,"张三") - .setRaw(Account::getAge,"age + 1") + .set(Account::getUserName, "张三") + .setRaw(Account::getAge, "age + 1") .where(Account::getId).eq(1) .update(); @@ -91,8 +91,8 @@ public class UpdateChainTest { public void testUpdateChainToSql() { String sql = UpdateChain.of(Account.class) .set(ACCOUNT.AGE, 18) - .set(Article::getAccountId, 4, 1 == 1) - .leftJoin(ARTICLE).on(ACCOUNT.ID.eq(ARTICLE.ACCOUNT_ID)) + .set(Article::getAccountId, 4) + .leftJoin(ARTICLE).as("ar").on(ACCOUNT.ID.eq(ARTICLE.ACCOUNT_ID)) .where(ACCOUNT.ID.eq(4)) .toSQL();