I need a list with three columns. column 1st and 3rd having values while 2nd as null.
Can I do it through HQL query?
I need something like this:
select id, null, name from MyClass
Where MyClass as well as underlying table has only two properties/columns ie, “id” and “name”
Another option that seems to work (tested on DB2, MySQL, Oracle, and SQL Server):
You could subclass the Hibernate dialect and abstract it with a custom function:
and then use this in your HQL: