I have to check null
against the entry.
I have address in person object, so I have tried to fetch it like below.
select new map(person.id as id,
case when person.address is not empty
then person.address.city end as city)
from Person person where person.id=:id
Does case..when
work with where
clause
But there is no error and result.