原因:
采用了** association** 级联,查询出的结果为两个"name",但是对象只能接受一个"name";报错:Statement returned more than one row, where no more than one was expected.
解决:如果不需要 association 级联的字段,可以自己重新写一个resultMap,或者修改sql,让其只获得一个"name"
原因:
采用了** association** 级联,查询出的结果为两个"name",但是对象只能接受一个"name";报错:Statement returned more than one row, where no more than one was expected.
解决:如果不需要 association 级联的字段,可以自己重新写一个resultMap,或者修改sql,让其只获得一个"name"