missing replace function for FirebirdDialect
Description
Hibernates FirebirdDialect is missing a registerFunction call to register the replace function.
I have a query (using QueryDSL) where i need to replace data in field.
With StringExpression template = StringTemplate.create("replace({0}, {1}, {2})", arg1, arg2, arg3); for querydsl i was able to get the replace in the jpa query but hibernates translates the replace(a,b,c) to replace(a||b||c).
after adding this to my FirebirdDialect it works as expected
registerFunction("replace", new SQLFunctionTemplate(
StandardBasicTypes.STRING, "replace(?1, ?2, ?3)"));
Maybe this function registration could also be a part of the InterbaseDialect wich is the parent of the FirebirdDialect
Environment
Hibernate 4.3.1.Final, QueryDsl 3.3.0, Firebrid 2.5
Activity
Closing resolved issued in preparation for releasing 4.3.6.
Thanks!
i created a PR for this https://github.com/hibernate/hibernate-orm/pull/734