Roo 1.3.1.RELEASE [rev f4f5256]为ORDER BY生成了这个错误的代码:
public static List<Company> Company.findAllCompanies(String sortFieldName, String sortOrder) {
String jpaQuery = "SELECT o FROM Company o";
if (fieldNames4OrderClauseFilter.contains(sortFieldName)) {
jpaQuery = jpaQuery + " ORDER BY " + sortFieldName;
if ("ASC".equalsIgnoreCase(sortOrder) || "DESC".equalsIgnoreCase(sortOrder)) {
jpaQuery = jpaQuery + " " + sortOrder;
}
}
return entityManager().createQuery(jpaQuery, Company.class).getResultList();
}
sortFieldName
需要一个o.
前置的我认为。