2014-01-31 1 views
-2

나는 아침부터이 문제를 해결하려고 노력해 왔습니다. 그러나 나는 할 수 없다.org.hibernate.QueryException : 속성을 확인할 수 없습니다 :

Query query = em.createQuery("Update ABC p set p.sync_status=14 where p.eventhistoryid in (select c.eventhistoryid from ABC c where c.sync_status=0 and c.receivedtimestamp >= getTimeStampAfterDeductingHours(24)"); 

ABC entity class contains the below column: 
@Column(name="sync_status") 
private short syncStatus = 0; 

이 열은 SMALLINT TYPE이고 NULL이 아닙니다.

아래의 오류 방법 : HQL/JPQL에서

org.hibernate.QueryException: could not resolve property: sync_status .

답변

1

을, 당신은 데이터베이스 열 이름을 참조하지 않는 대신 속성 이름을 참조합니다.

sync_status이 아닌 쿼리에서 syncStatus을 사용하십시오.

관련 문제