2
org.hibernate.hql.ast.QuerySyntaxException:无法提领标量集合元素:cspName休眠异常
st.append("SELECT customers.name,sum(csp.cspValue) as TotalMoney ");
st.append("from Account as account ");
st.append("left join account.CSPFields as csp with ((account.accountID=csp.id) and (csp.cspName = 'Target')) ");
st.append("left join Customers as customers");
st.append("with account.customerExec.id=customers.id ");
st.append("where (account.accountDate between :startDate and :endDate) ");
st.append("and (account.accountBatch.id in (:acIDs)) ");
st.append("group by customers.name");
CSPFields是在帐户类映射的对象。 cspName是地图收集中的关键。