202110-15 mybatis如何使用注解实现一对多关联查询 mybatis注解实现一对多关联查询@Select("selectid,mockexam_sectionassection,idassectionId"+"fromt_p_qb_mockexam_section"+"wheremockexam_charpter_id=#{charpterId}andis_delete=0"+"orderbymockexam_section_idxasc")@Results({@Result(property="questionList",column="sectionId",many=@Many(select="com.zikaoshu.baseinfo.mapper.BaseinfoQuestionMapper.listQuestionResDto"))... 继续阅读 >
202012-05 解决mybatis一对多关联查询多条数据只显示一条的问题 一对多,如果多个表字段名相同,要记住使用别名,否则多条数据只显示一条<resultMaptype="com.example.demo.model.TuserModel"id="extendMapper"><idcolumn="id"property="id"/><resultcolumn="user_name"property="userName"/><resultcolumn="nick_name"property="nickName"/><resultcolumn="avatar"property="avatar"/><resultcolumn="email"property="email"/><resultcolumn="signature"property="sig... 继续阅读 >