Mybatis-3: SQL can`t use LIMIT AND OFFSET

Created on 13 Apr 2019  ·  1Comment  ·  Source: mybatis/mybatis-3

    public String selectAdminLike(Admin admin) {
        return new SQL() {{
            SELECT("A.name,A.email,A.id");
            FROM("ADMIN A");
            if (admin.getName() != null) {
                WHERE("A.name = '" + admin.getName() + "'");
            }
            if (admin.getEmail() != null) {
                WHERE("A.email = " + admin.getEmail());
            }
        }}.toString();
    }

can`t use limit and offset

Most helpful comment

@visonforcoding Thanks for your reporting!

I've fixed this issue via #1521. Please try on 3.5.2-SNAPSHOT. 3.5.2-SNAPSHOT has been deployed already on OSS NEXUS.

>All comments

@visonforcoding Thanks for your reporting!

I've fixed this issue via #1521. Please try on 3.5.2-SNAPSHOT. 3.5.2-SNAPSHOT has been deployed already on OSS NEXUS.

Was this page helpful?
0 / 5 - 0 ratings