Hi, I have this CASE statement that I need to implement somehow in my entity:
'contract_type' =
case when NOT max(CT3.CONTRACT_CODE) IS NULL then max(CT3.CONTRACT_CODE)
when NOT max(CT.CONTRACT_CODE) IS NULL then max(CT.CONTRACT_CODE)
else max(CT2.CONTRACT_CODE)
end,
CT, CT2 and CT3 are all joins to one table based on different criteria.
How do I do this?!? Is the only way using the iPredicate implementation and if so, how exactly do I emit this string directly into the query? Can someone please provide some code?
Thanks in advance,
G.I.