You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<selectid="selectByNotDeletedAndUserId"resultType="org.example.entity.Course">
SELECT * FROM course WHERE deleted = 0 AND user_id = #{userId}
</select>
确认
当前程序版本
3.5.7
问题描述
使用分页查询时,如果在xml文件中不指定resultType,结果集的自动映射似乎会失效,进而导致Page.getRecords返回的列表所有元素均为null(total字段和records的size是正常的)
如果指定returnType,则一切正常
但是在不使用分页查询,并且不指定returnType的情况下,结果集的自动映射是能正常工作的,返回的结果也是正常的。
这种不一致性会给使用者带来困惑,而且问题产生过程没有抛出任何的异常或输出警告日志,如果使用者只是漏写了returnType,排查起来非常困难
详细堆栈日志
The text was updated successfully, but these errors were encountered: