Problem is still relevant for hibernate 5 and also for other dialects. The main problem with the templated approach is the fact that it breaks when the DBMS internationalizes the messages and the server runs with a non english locale.