mybatis-plus collection association

1、collection

a、分页

<collection 
    property="roomGraphVoList" 
    ofType="com.atguigu.lease.web.app.vo.graph.GraphVo"
    select="selectGraphVoByRoomId" 
    column="room_id"/>

b、不分页

<collection 
    property="roomGraphVoList" 
    ofType="com.atguigu.lease.web.app.vo.graph.GraphVo"/>

2、association

<association property="apartmentInfo" javaType="com.atguigu.lease.model.entity.ApartmentInfo" autoMapping="true">
    <id property="id" column="apartment_id"/>
    <result property="name" column="apartment_name"/>
</association>

 

posted @ 2025-05-18 20:15  市丸银  阅读(9)  评论(0)    收藏  举报