我收到以下异常
org.springframework.orm.hibernate3.HibernateQueryException: unexpected
char: '{'
hibernateTemplate.find("select new com.XXX.application.modules.service.vo.ServiceRuleVO( A.id, A.serviceTypeId, A.petLocationId, A.startDate, A.endDate, A.status, A.recurFrequency, A.recurCount, A.recurInterval, A.recurByDays, A.recurByMonths, A.recurByMonthDay, A.billable, A.modifiedBy, A.modifiedTime, {B} ) from ServiceRule as A left join ServicePet as C on C.serviceRuleId=A.id left join Pet as B on B.id=C.petId order by FROM_UNIXTIME(A.startDate) desc");
VO 类中的构造函数
public ServiceRuleVO(int id, int serviceTypeId, int petLocationId,
int startDate, int endDate, int status, String recurFrequency,
int recurCount, int recurInterval, String recurByDays,
String recurByMonths, int recurByMonthDay, int billable,
int modifiedBy, int modifiedTime, List<Pet> petList) {
super();
this.id = id;
this.serviceTypeId = serviceTypeId;
this.petLocationId = petLocationId;
this.startDate = startDate;
this.endDate = endDate;
this.status = status;
this.recurFrequency = recurFrequency;
this.recurCount = recurCount;
this.recurInterval = recurInterval;
this.recurByDays = recurByDays;
this.recurByMonths = recurByMonths;
this.recurByMonthDay = recurByMonthDay;
this.billable = billable;
this.modifiedBy = modifiedBy;
this.modifiedTime = modifiedTime;
this.petList = petList;
}
如何使用 hibernateTemplate 将数据设置为 VO 类