javabean字段: publishTime,数据库字段 :publish_time
criteria.add(Restrictions.between("to_char(publishTime,'yyyy-MM-dd')", map.get("starttime"), map.get("endtime")));查询总是报org.hibernate.QueryException: could not resolve property: to_char('publishTime','yyyy-MM-dd') of org.test.Goods如果传进来的是日期则
criteria.add(Restrictions.between("publishTime", map.get("starttime"), map.get("endtime")));这样写就正确,
请教to_char如何修改?