首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

There is no statement named User.login in this SqlMap错误的处理

2012-10-31 
There is no statement named User.login in this SqlMap异常的处理ibatIS需要注意的几个地方,否则很容易

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

?

热点排行