More Hibernate validation issues
I am using Hibernate with Spring and received some validation errors that I believe are incorrect. In the code snippit below, I receive a type mismatch on current_date() saying that java.util.Date type is expected. However, current_date() should fulfill this type. The second and third errors I am receiving are that IDEA can not resolve the two query parameters in the setParameterList method calls even thou they are defined in the query. Before I submitted these as bugs, I would like to get some input.
Thanks,
Steve
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);
query.setParameterList("divisions",Keys.getTPDDeptDivCodes());
query.setParameterList("TPDRefTypes", TPDRefTypes);
Collection caseList = query.list();
Please sign in to leave a comment.
I think it's a good idea to create two separate issues. (Better too much
issues in JIRA than too few)
-tt
Definitely. Just trying to make sure it was not user error as I am new to Hibernate / Spring in general and in IDEA.
These are really bugs, so please fire 2 issues.
Hello Steve,
By the way, you can use
blocks to insert example code snippets
in a JIRA issue.
-tt
tt: Thanks for the JIRA tip. I'll use it next time.
The issues opened are:
http://www.jetbrains.net/jira/browse/IDEADEV-22674
http://www.jetbrains.net/jira/browse/IDEA-15785
Hello Steve,
Another good idea is to add yourself as "Watcher" to the newly created issue.
Quite often more information is needed to reproduce a bug, and if the original
reporter doesn't comment such JIRA tickets end up in limbo forever.
Actually, every single bug tracker I've ever used added the reporter to the
"CC"/"Watchers" field automatically.
I think it would be a good idea if the Jetbrains JIRA instance did the same
thing.
-tt
Hello Taras,
This is not necessary because the reporter receives comment notifications
even when he's not watching the issue.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"