diff --git a/mybatis-flex-core/src/test/java/com/mybatisflex/coretest/AccountSqlTester.java b/mybatis-flex-core/src/test/java/com/mybatisflex/coretest/AccountSqlTester.java index a45fe10b..3c642884 100644 --- a/mybatis-flex-core/src/test/java/com/mybatisflex/coretest/AccountSqlTester.java +++ b/mybatis-flex-core/src/test/java/com/mybatisflex/coretest/AccountSqlTester.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025, Mybatis-Flex (fuhai999@gmail.com). + * Copyright (c) 2022-2024, Mybatis-Flex (fuhai999@gmail.com). *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@ import com.mybatisflex.core.dialect.KeywordWrap;
import com.mybatisflex.core.dialect.LimitOffsetProcessor;
import com.mybatisflex.core.dialect.impl.CommonsDialectImpl;
import com.mybatisflex.core.dialect.impl.OracleDialect;
+import com.mybatisflex.core.query.CPI;
import com.mybatisflex.core.query.DistinctQueryColumn;
import com.mybatisflex.core.query.QueryWrapper;
import com.mybatisflex.core.query.RawQueryColumn;
@@ -35,7 +36,10 @@ import com.mybatisflex.coretest.table.ArticleTableDef;
import org.junit.Assert;
import org.junit.Test;
+import java.util.ArrayList;
import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
import static com.mybatisflex.core.query.QueryMethods.avg;
import static com.mybatisflex.core.query.QueryMethods.case_;
@@ -887,4 +891,47 @@ public class AccountSqlTester {
System.out.println(SqlFormatter.format(qw.toSQL()));
}
+ @Test
+ public void testToQueryWrapper() {
+ Account account = new Account();
+ account.setId(1L);
+ account.setSex(3);
+ account.setAge(18);
+ account.setUserName("michael");
+
+ Map