ibatis 动态sql(Dynamic SQL)

阅读更多
  springside2allOne中ibatis只用几个孤零的ibatis的dao封装,没看到什么demo。
  官网http://wiki.springside.org.cn/display/springside/iBatis的说明也很简略。在Springside中使用ibatis,参考这里,http://leondu.iteye.com/blog/54694。
  IBatisGenericDao中get、getall明显公用一个statement,因此sql是动态的,参考
http://ibatis.apache.org/docs/dotnet/datamapper/ch03s09.html
   个人ibatis配置如下
 


	
	 
	


  


 





	
	
  
	
	


 
	
		insert into Attraction(id,name,description) values ( #id#,#name#,#description# )
	

	
		update Attraction set name = #name#,description=#description#
		where id=#id#
	

	
		delete from Attraction where id=#id#
	
	
	



  

 

你可能感兴趣的:(SQL,iBATIS,DataMapper,Apache,DAO)