ibatis根据一个条件查询多条记录时出错 5
错误信息:---Theerroroccurredincom/gem/servlet/day1/Employee.xml.---Theerroroccurredwhilea...
错误信息:
--- The error occurred in com/gem/servlet/day1/Employee.xml.
--- The error occurred while applying a result map.
--- Check the searchByDep-AutoResultMap.
--- The error occured while instantiating the result object
配置文件该怎么该,
<select id="searchByDep" parameterClass="String" resultClass="Employee">
select * from employee where department=#department#
</select>
忒坑爹。。。 展开
--- The error occurred in com/gem/servlet/day1/Employee.xml.
--- The error occurred while applying a result map.
--- Check the searchByDep-AutoResultMap.
--- The error occured while instantiating the result object
配置文件该怎么该,
<select id="searchByDep" parameterClass="String" resultClass="Employee">
select * from employee where department=#department#
</select>
忒坑爹。。。 展开
3个回答
展开全部
看你的错误日志,是你在返回结果集的时候,映射的resultClass出错了。错误是“当实例化结果对象的时候出错了”,你看下是不是Employee类哪里不对了。映射到这个类的路径之类的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
resultMap="abatorgenerated_AddresslistResult"要在select中加一个类似于这样的resultMap呀
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询