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

Show:
Gail Badner
July 10, 2014, 5:58 AM

Closing resolved issued in preparation for releasing 4.3.6.

Brett Meyer
May 23, 2014, 9:31 PM

Thanks!

Dodge
April 28, 2014, 12:41 PM
Fixed

Assignee

Brett Meyer

Reporter

Dodge

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

backportDecision

None

Affects versions

Priority

Minor