67,513
社区成员
发帖
与我相关
我的任务
分享
public List findAll() {
log.debug("finding all RetailerIndex instances");
try {
String queryString = "from RetailerIndex";
Query queryObject = getCurrentSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find all failed", re);
throw re;
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding RetailerIndex instance with property: "
+ propertyName + ", value: " + value);
try {
String queryString = "from RetailerIndex as model where model."
+ propertyName + "= ?";
Query queryObject = getCurrentSession().createQuery(queryString);
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
}
Hibernate: select retailerin0_.retailerId as retailerId2_, retailerin0_.retailerName as retailer2_2_, retailerin0_.retailerAddress as retailer3_2_, retailerin0_.retailerContact as retailer4_2_ from inventory.dbo.retailer_index retailerin0_
第二段代码无法执行