asp 2.0 Nhibernate 1.2.0.Beta1
I have a Customer entity that has a many to one relationship with a Location entity.
I need a piece of HQL that returns a distinct alphabetical sorted List of Locations used by Customers.
Im having trouble getting my head around how to do this in HQL, in SQL it would be something like this:
Code:
SELECT DISTINCT LocationID
FROM Customers
ORDER BY LocationID
How do i do this in HQL? bearing in mind i don't want a list of LocationIDs returned, i want a list of Location Objects.
Thanks