Hibernate: select this_.UID as y0_, this_.PATH as y1_, this_.NAME as y2_ from AWARD this_ where this_.DELETED=?
java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Boolean
Hibernate代碼
criteria.add(Restrictions.eq("deleted", 0));
criteria.setProjection(Projections.projectionList().add(Projections.property("uid"))
.add(Projections.property("path")).add(Projections.property("name"))).
setResultTransformer(Transformers.aliasToBean(AwardsInSession.class));
List<AwardsInSession> la = criteria.list();
度身訂做POJO
public class AwardsInSession extends BaseModel{
private String uid;
private String path;
private String name;
在JPA實體這些3是字符串類型
是的,這是一個很好的地方 –