
SELECT id, user_name, email FROM users WHERE id = #{id}
<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"/>

文章已关闭评论!