Kid Lueng 发布于102月前 3答/1472阅
使用原版jfinal没问题,应该是修改了RecordBuilder所欲出错了.
java.lang.ClassCastException: java.lang.Integer cannot be cast to [Ljava.lang.Object; at com.jfinal.plugin.activerecord.DbPro.delete(DbPro.java:434) at com.eova.widget.grid.GridController$2.run(GridController.java:280) at com.jfinal.plugin.activerecord.DbPro.tx(DbPro.java:720) at com.jfinal.plugin.activerecord.DbPro.tx(DbPro.java:757) at com.jfinal.plugin.activerecord.Db.tx(Db.java:460) at com.eova.widget.grid.GridController.delete(GridController.java:260)
用java 1.8编译eova项目时,使用删除功能时就会报错
解决方案
com.jfinal.plugin.activerecord.DbPro line 434 return deleteById(tableName, primaryKey, record.get(primaryKey)); 改为 return deleteById(tableName, primaryKey, new Object[]{record.get(primaryKey)});