SELECT a.id,
a.user_id AS userId,
a.content, a.status,
a.create_time AS createTime,
a.address,
a.type,
a.people_count AS peopleCount,
a.fee_content AS feeContent,
a.active_time AS activeTime,
a.condition, a.pic,
a.join_count,
c.avatars AS initiatorAvatars,
c.phone AS initiatorPhone,
c.name As initiatorName
FROM t_active a
LEFT JOIN t_join_active b ON a.id = b.active_id
LEFT JOIN t_user c ON a.user_id=c.id
WHERE a.id=?
id是主键查询出两条相同的记录。
org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 2
报了这个错。
sql复制到数据库中查询,只有一条。请教是什么问题