RegisterFunction is not working wiht the hibernate upgeaade from 5.6 to 6.1

here is the code could any onre please help me with the alternative for this in the latest version for the registerFunction method

public class DB2ExtendedDialect extends DB2Dialect {
public DB2ExtendedDialect() {
super();
registerFunction(
“regexp_like”, new SQLFunctionTemplate(StandardBasicTypes.BOOLEAN,
“( regexp_like(?1, ?2) = 1 )”)
);
}
}

Search in the forum. This question was answered multiple times already: Search results for 'registerFunction' - Hibernate

See Hibernate 6 QuarkusH2Dialect registerFunction and Migration of dialect to Hibernate 6