发布网友
共2个回答
热心网友
这要用到动态sql了,首先你要改成
<resultMap type="test" id="test">
<id property="id" column="id" />
<result column="name" property="name" />
<collection property="picture" ofType="picture">
<id property="picture_id" column="id" />
<result column="proct_id" property="proct_id" />
<result column="img" property="picture_img" />
</collection>
</resultMap>
<select id="selecTests" resultMap="test">
select
A.id ,
B.proct_id,
B.img,
A.name
from test A
LEFT JOIN
picture B ON A.id=B.proct_id
</select>
还有就是你的悬赏太少了
热心网友
直接这样写就可以了追问报错啊,兄弟,不能直接这样写。。