Hi
I am using Hibernate 3.2 . I am having issues with HQL which has case statementsin my where clause. Inside the case I do have a select statement and it seem it is not supported. Here is HQL
select
new com.assurant.inc.sas.reminder.dto.ReminderDTO
(reminder.rmndrId,
reminder.caseDetails.caseDetailsId,
reminder.caseDetails.solarId,
reminder.emailSalesAlertFlg,
reminder.emailNbcAlertFlg,
reminder.rmndrNoteTxt,
reminder.rmndrEffDt,
reminder.rmndrFollowUpDt,
ltrim(rtrim(companyGroup.name)),
ltrim(rtrim(broker.firmName)),
ltrim(rtrim(broker.lastName)),
ltrim(rtrim(broker.firstName)),
reminder.sasUserByCrtdUserId.userNm,
reminder.sasUserByCrtdUserId.displayNm,
case when reminder.emailSentDt is null then false
else true end )
from
Reminder reminder,
CompanyGroup companyGroup
inner join companyGroup.broker broker
inner join reminder.caseDetails caseDetails
where reminder.rmndrId =
(
(
case when reminder.emailSentDt is null then
(
select 1 from dual
)
else
(
select 1 from dual
)
end
)
)
and reminder.caseDetails.companyGroupId=companyGroup.companyGroupId
and caseDetails.solarId=:solarId
|