Project
IntelliJ IDEA
Priority
Normal
Type
Bug
Fix versions
No Fix versions
State
Fixed
Assignee
Peter Gromov
Subsystem
Code Analysis. Inspection
Affected versions
No Affected versions
Fixed in build
108.65  
  • Created by   Steve Wardell
    4 years ago (17 Oct 2007 02:59)
  • Updated by   root
    2 years ago (17 Jan 2010 20:54)
  • Jira: IDEADEV-22678
    (history, comments)
 
IDEA-41653 Inspection does not recognize current_date() Hibernate function
1
Issue is visible to: All Users
  The issue is visible to the selected user group only
I am using Hibernate with Spring and received a validation error that I believe is incorrect. In the code snippit below, I receive a type mismatch on "current_date()" with the error message that java.util.Date type is expected. However, current_date() should fulfill this type.

I String HQL =
"from CASE a where a.case_id_nmbr in ("+
"select distinct pad.plnadmCaseIdNmbr from Planadministration pad," +
" CASE cs, Assignment asg "+
" WHERE pad.plnadmOngoingAsmptnDate <= current_date() "+
" and cs.case_cascateg_code is not null "+
" and cs.case_cascateg_code <> 0 "+
" and asg.assignDeptDivCode in (:divisions) "+
" and asg.assignEndDate is null "+
" and asg.assignCaseIdNmbr=pad.plnadmCaseIdNmbr "+
" and pad.plnadmCaseIdNmbr = cs.case_id_nmbr "+
" and 0 = "+
" ( select count (*) " +
" from CaseMilestone cml "+
" where cml.casmlstnCaseIdNmbr = cs.case_id_nmbr " +
" and (cml.casmlstnFinalizedFlag is null or cml.casmlstnFinalizedFlag = 'N') "+
" and not (cml.casmlstnReftypeCode in (:TPDRefTypes) )" +
" and cml.casmlstnReftypeCode not in " +
" (select ref.reftype_code FROM ReferralType ref WHERE ref.reftype_archive_flag='Y')"+
" ) "+
") " +
"order by a.case_id_nmbr";

Query query = session.createQuery(HQL);

Issue was resolved
Comments (3)
 
History
 
Linked Issues (?)
 
Taras Tielkes
  Taras Tielkes
25 Oct 2007 17:17
4 years ago
HQL provides current_time() and current_timestamp() as well.

Are these recognized by IDEA 7.0.2?
Taras Tielkes
  Taras Tielkes
25 Oct 2007 17:20
4 years ago
Peter Gromov
  Peter Gromov
25 Oct 2007 20:10
4 years ago
Yes, they're supported