解决SSH框架中hibernate根据多属性查询数据库报错:unexpected char :‘@’
问题描述
使用myeclipse工具对数据表进行逆向工程生成的DAO类中会有一个findByProperty方法:
public List findByProperty(String propertyName, Object value) {
log.debug("finding StudentCheck instance with property: "
+ propertyName + ", value: " + value);
try {
String queryString = "from StudentCheck as model where model."
+ propertyName +