Reputation: 785
There is sql statement
select distinct create_date from articles
Is it possibele to write this statement using HQL?
Cheers!
Upvotes: 1
Views: 195
Reputation: 597324
Yes, it is. HQL supports the DISTINCT
keyword.
SELECT DISTINCT a.createDate FROM Article a
I'd propose naming your entity Article
(rather than articles
) and to use camelCase (rather than under_score)
Upvotes: 5