2013-04-29 2 views

답변

2

그것은 HQL 동일한이다 : 상기 코드

select c.type, sum(c.amount) from CustomerPayment c group by c.type

+0

준다 org.hibernate.QueryException : 기대 값 : C 의해 CustomerPayment C 형 그룹 [선택 c.type, SUM (c.amount) 하였다. 타입] \t org.hibernate.hql.classic.FromParser.token (FromParser.java:106) 오류 – user2326472

+0

'CustomerPayment' 엔티티에 대한 코드를 게시하십시오. 나는 당신이 대응하는 필드에 매핑 된 양과 타입 컬럼을 가지고 있다고 가정했다. – dcernahoschi

+0

그래 내가 "= 내 테이블 – user2326472

관련 문제