HQL allows selection of constant values like SELECT 2016, f.bar FROM Foo AS f but sometimes its required to use SELECT :year, f.bar FROM Foo AS f because of separation of concern. What if the parameter is a decimal, enum or else? As long its one of the hibernate types it should be possible to allow SELECT :year .... This is usefull when having dynamic queries with optional group by statements which are always mapped to a default bean using transformer. |