I have a Java Entity with a field with the annotation @Formula, in which is executed an SQL query containing some specific function for Firebird database. Now I have to migr
You can achieve this slightly different way.
You can place in the @Formula
a placeholder "{TO_BE_REPLACED}"
and add a Hibernate Interceptor to change onPrepareStatement.
There you can can change SQL generated by hibernate. JUst check the SQL string and replace the {TO_BE_REPLACED}
with your real value.
See how to add interceptor here