当前位置:首页 > Java 框架原理百科 > 正文

MyBatis查Java优学网结果映射:轻松掌握复杂数据查询与懒加载技巧

<result property="userName" column="user_name"/>
<association property="userDetail" javaType="UserDetail">
    <result property="realName" column="real_name"/>
    <result property="phone" column="phone"/>
</association>

<result property="title" column="title"/>
<result property="price" column="price"/>
<association property="teacher" column="teacher_id" 
             select="selectTeacherById" fetchType="lazy"/>
<collection property="chapters" column="id" 
            select="selectChaptersByCourseId" fetchType="lazy"/>

MyBatis查Java优学网结果映射:轻松掌握复杂数据查询与懒加载技巧

你可能想看:

相关文章:

  • Java优学网MyBatis关联查询教程:轻松掌握数据表关联,告别繁琐查询2025-10-25 20:26:54
  • 文章已关闭评论!