In some cases, mybatis automatically added a LIMIT clause to my statement when the query was executed, resulting in the data I received was missing.
here is my mybatis query:
here is app log query:
==> Preparing: select id, name
, parent_id, url, perms, type
, icon, order_num, create_by, create_time, last_update_by, last_update_time, del_flag from sys_menu LIMIT ?
==> Parameters: 2(Integer)
I am using MyBatis 3.5.5
Comment From: dongbaibai
You should check to see if it exists paginationintercepter
Comment From: Hublxc118
@dongbaibai I don't use the Mybatis interceptor, the LIMIT clause is sometimes automatically added, sometimes not
Comment From: harawata
Hello @Hublxc118 ,
MyBatis never adds LIMIT automatically. You must be using some 3rd party extension like page helper, mybatis plus, etc..
Comment From: Hublxc118
Hello @harawata ,
I don't use pagination intercepter for this case.
This is the statement I get the data back:
private List
This is the Mapper file:
public interface SysMenuExMapper {
List
List<SysMenu> findRoleMenus(@Param("roleId") Long roleId);
List<SysMenu> selectAll();
}
Comment From: harawata
@Hublxc118 ,
If you could create and share a small project like these that replicate the problem, I would take a look.
Comment From: harawata
No reply. This cannot be a MyBatis issue.