This is a valid native query for MSSQL JDBC driver. How can I re-write this as HQL? thx.
Code:
select er.equipmentRepairId, e.serialNumber,
ddv.description,
sum(erc.cost) as Cost
from Equipment as e
inner join EquipmentRepair as er on er.equipmentId = e.equipmentId
left outer join EquipmentRepairCost as erc on er.equipmentRepairId = erc.equipmentRepairId
left outer join DropDownValue as ddv on er.equipmentRepairTypeCode = ddv.code
left outer join DropDown as dd on dd.listId = ddv.listId
where e.serialNumber = :serialNumber and
dd.listName = :repairTypeDropDown
group by er.equipmentRepairId,
e.serialNumber,
ddv.description