/**
* Paginate.
* @param pageNumber the page number
* @param pageSize the page size
* @param select the select part of the sql statement
* @param sqlExceptSelect the sql statement excluded select part
* @param paras the parameters of sql
* @return Page
*/
publicPage<M> paginate(intpageNumber,intpageSize, String select, String sqlExceptSelect, Object... paras) {
Config config = getConfig();
Connection conn = null;
try{
conn = config.getConnection();
returnpaginate(config, conn, pageNumber, pageSize, select, sqlExceptSelect, paras);
}catch(Exception e) {
thrownewActiveRecordException(e);
}finally{
config.close(conn);
}
}
* Paginate.
* @param pageNumber the page number
* @param pageSize the page size
* @param select the select part of the sql statement
* @param sqlExceptSelect the sql statement excluded select part
* @param paras the parameters of sql
* @return Page
*/
publicPage<M> paginate(intpageNumber,intpageSize, String select, String sqlExceptSelect, Object... paras) {
Config config = getConfig();
Connection conn = null;
try{
conn = config.getConnection();
returnpaginate(config, conn, pageNumber, pageSize, select, sqlExceptSelect, paras);
}catch(Exception e) {
thrownewActiveRecordException(e);
}finally{
config.close(conn);
}
}
原因:
model没绑定的时候 貌似会抱一个类似的错;.
解决方法:在BaseConfig中的插件配置configPlugin中进行DB映射(例如:arp.addMapping(tableName,primary Key,modelClass.class))。