Mybatis--association
①借助其它Mapper完成连表查询:
<association property="createUser" select="com.bd.dao.UserScInfoMapper.selectScUserNameById"
column="create_by">
</association>
说明:column是数据库字段,property为Java类属性。
②在本Mapper完成连表查询:
<collection property="nicInfoList"
ofType="com.bd.info.model.info.NicInfo"
column="{id=id, azId=az_id}" javaType="ArrayList" select="getNicInfoList">
</collection>
说明:ofType为列表类型,javaType为返回类型,select为查询体。(column是数据库字段,property为Java类属性)
- association collection Mybatis mapperassociation collection mybatis mapper association collection mybatis association collection mybatis标签 association collection mybatis-plus springboot mybatis mapper mybatis方法mapper mybatis方式mapper mybatis mapper and tk mybatis简介mapper mapper-locations mapperlocations mybatis-plus