this would be my query:
SELECT DISTINCT name FROM city;
this is my code at the moment:
public List<City> listCities() {
return sessionFactory.getCurrentSession().createQuery("from City").list();
}
which means:
SELECT * FROM city;
How must I change the code, so the query would be correct?
I hope I gave enough information, feel free to ask questions.