action:
public Page doSave(WebForm form) {
PurchaseBill object = form.toPo(PurchaseBill.class);
domain:
public class PurchaseBill implements IJsonObject {
@Id
@GeneratedValue(strategy = GenerationType.TABLE)
private String id;
错误:
ERROR [com.easyjf.web.core.DefaultRequestProcessor] - 出现错误:org.springframework.dao.InvalidDataAccessApiUsageException: Provided id of the wrong type. Expected: class java.lang.String, got class java.lang.Long; nested exception is java.lang.IllegalArgumentException: Provided id of the wrong type. Expected: class java.lang.String, got class java.lang.Long
为什么,domain的id用String 和 int 就会报这种错误?难道form.topo(),的id类型只
能是Long?想不明白怎么会和类型有关,页面转实体怎么和类型有关,还是哪里有什
么配置问题?才接触easyjweb,求解答!
public Page doSave(WebForm form) {
PurchaseBill object = form.toPo(PurchaseBill.class);
domain:
public class PurchaseBill implements IJsonObject {
@Id
@GeneratedValue(strategy = GenerationType.TABLE)
private String id;
错误:
ERROR [com.easyjf.web.core.DefaultRequestProcessor] - 出现错误:org.springframework.dao.InvalidDataAccessApiUsageException: Provided id of the wrong type. Expected: class java.lang.String, got class java.lang.Long; nested exception is java.lang.IllegalArgumentException: Provided id of the wrong type. Expected: class java.lang.String, got class java.lang.Long
为什么,domain的id用String 和 int 就会报这种错误?难道form.topo(),的id类型只
能是Long?想不明白怎么会和类型有关,页面转实体怎么和类型有关,还是哪里有什
么配置问题?才接触easyjweb,求解答!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货