Currently Hibernate rejects queries like: select new Person(id as id, firstName as firstName, null as middleName, lastName as lastName) from ... and this is just too fussy. The workaround is to write cast(null as String) but that should not be necessary. |