I have a Person entity belongs to a person has a Country, I want to select all the distinct countries that have people in them. Easy in HQL
select distinct p.Country from Person p
How can I do this using a Criteria Query?
criteria.SetProjection(Projections.Distinct(Projections.Property("Country")));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With