读书人

There is no statement named User.lo

发布时间: 2012-10-31 14:37:32 作者: rapoo

There is no statement named User.login in this SqlMap异常的处理

ibatIS需要注意的几个地方,否则很容易出错,避免低级错误的方法:

1.TPhonesale.xml中,必须要定义namespace

2.TPhonesale.xml中??parameterenhancementEnabled="true"
??lazyLoadingEnabled="false" useStatementNamespaces="true" />
? ?
?<sqlMap resource="com/hanpeng/base/ibatis/COMMON_SqlMap.xml"/>
?<sqlMap resource="com/hanpeng/base/ibatis/Area.xml"/>
?<sqlMap resource="com/hanpeng/base/ibatis/Tconfig.xml"/>
?<sqlMap resource="com/hanpeng/base/ibatis/TPhonesale.xml"/>
</sqlMapConfig>

4.实际中继承SqlMapClientDaoSupport,使用.queryForObject("namespace.id名",object/parameterObject);

?

-----------------------------------------------------------------------------------

?

使用ibatIS,出现了下面的错误

There is no statement named User.login in this SqlMap,网上查询发现,xml中没有定义namespace

?

读书人网 >SQL Server

热点推荐