Rafal Figas commented on an issue
Hibernate ORM / Improvement HHH-7227
distinct query in sql server when table contains text field
When SQL Server 2008 is used to run HQL query:

"select distinct a from A a"

and A contains field(s) mapped as type text exception is thrown:

com.microsoft.sqlserver.jdbc.SQLServerException: The text data type cannot be selected as DISTINCT because it is not comparable.

I don't know if it is even possible, but maybe it would be convenient to generate S...