Hello,
I'm facing an issue in HQL.
I've Person bean and Set of Address bean inside it.
Person contains a field externalZipCode.
Address bean contains a field zipCode.
I want to get List of Person if either Person.externalZipCode = 94102 or Address.zipCode = 94102
My HQL goes like this -
--------HQL------
from Person p left join p.address as ad where p.externalZipCode = 94102 or ad.zipCode = 94102.
--------HQL------
This method returns List<Person>
The query runs successfully however I get ClassCastException when iterate over List<Person>
Any help would be greatly appreciated!
Thank you,
R.B.
|