Closed GoogleCodeExporter closed 8 years ago
<#list table.columns as column> <#if column.unique && !column.pk> public ${className} getBy${column.columnName}(${column.javaType} v) { return (${className})getSqlSession().selectOne("${className}.getByUsername",v); } </#if> </#list> 以上为模板源程序 我觉得是不是应改为: <#list table.columns as column> <#if column.unique && !column.pk> public ${className} getBy${column.columnName}(${column.javaType} v) { return (${className})getSqlSessionTemplate().selectOne("${className}.getBy${column.colu mnName}",v); } </#if> </#list> 修改:getSqlSession()--》getSqlSessionTemplate() getByUsername--》getBy${column.columnName} 例如: public UserLoginSession getByUserid(java.lang.String v) { //return (UserLoginSession)getSqlSession().selectOne("UserLoginSession.getByUsername",v); // The method getSqlSession() is undefined for the type UserLoginSessionDao return (UserLoginSession)getSqlSessionTemplate().selectOne("UserLoginSession.getByUseri d",v); }
Original issue reported on code.google.com by zgw06...@gmail.com on 26 Feb 2010 at 7:44
zgw06...@gmail.com
十分感谢,已经修正
Original comment by bad...@gmail.com on 26 Feb 2010 at 1:36
bad...@gmail.com
Original issue reported on code.google.com by
zgw06...@gmail.com
on 26 Feb 2010 at 7:44