2017-04-14 8 views
0

최대 절전 모드 4.3.11.final 사용. (괄호가 추가 둘러싼)최대 절전 모드 : 하위 선택 쿼리에서 IN 절을 사용할 때 stange 오류

select distinct doc from DocumentType doc join doc.usages u where u.institute not in :institutes and doc.id not in (select distinct doc1.id from DocumentType doc1 join doc1.usages u1 where u1.institute in :institutes) 

제대로 생성되는 조항의 첫 번째하지만 하나

우리는 우리가 하위 선택 쿼리의 예에 에 절을 사용 @query 주석과 요청을 subselect에 없습니다.

생성 된 SQL은 다음과 같습니다

select distinct doc from fr.itce.pen.model.customer.folder.DocumentType doc join doc.usages u where u.institute not in (:institutes_0_, :institutes_1_) and doc.id not in (select distinct doc1.id from fr.itce.pen.model.customer.folder.DocumentType doc1 join doc1.usages u1 where u1.institute in :institutes_0_, :institutes_1_)] 

업무용 주위로 선언 된 쿼리에 괄호 부분에 서라운드하는 것입니다

select distinct doc from DocumentType doc join doc.usages u where u.institute not in :institutes and doc.id not in (select distinct doc1.id from DocumentType doc1 join doc1.usages u1 where u1.institute in (:institutes)) 

작동 할 수있는 더 나은 방법이 있나요, 최근의 최대 절전 모드 버전에서이 '버그'가 수정 되었습니까? 최대 절전 모드 문제를 살펴 봤지만이 동작에 대한 정보를 찾을 수 없었습니다.

감사합니다.

+0

내가 물린 것처럼 보인다 https://hibernate.atlassian.net/browse/HHH-5126?focusedCommentId=62841&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment- 62841 – Nemesis

답변

0

아마 버그 일 수 있지만 4.3에서는 수정되지 않습니다.

테스트 케이스와 Jira 문제가있는 5.2에서이를 복제해야합니다.

+0

험 (hum) 우리는 List에 을 요청합니다. 그래서이 부분을 존중하지만 어쩌면 당신의 대답을 신뢰하지 않을 것입니다. – Nemesis

+0

대답을 –

+0

업데이트했습니다. 감사합니다. – Nemesis

0

버그 였고, 최대 절전 모드 5.2로 수정되었습니다.