From 54cc9073f4ae0886a51901495bd19b09e9d200f6 Mon Sep 17 00:00:00 2001 From: dodgex Date: Mon, 28 Apr 2014 14:39:22 +0200 Subject: [PATCH] [HHH-8941] add SQLFunctionTemplate for replace() to FirebirdDialect --- .../main/java/org/hibernate/dialect/FirebirdDialect.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/FirebirdDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/FirebirdDialect.java index 6be4dba763..2b742d3006 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/FirebirdDialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/FirebirdDialect.java @@ -23,10 +23,12 @@ */ package org.hibernate.dialect; +import org.hibernate.dialect.function.StandardSQLFunction; import org.hibernate.dialect.pagination.AbstractLimitHandler; import org.hibernate.dialect.pagination.LimitHandler; import org.hibernate.dialect.pagination.LimitHelper; import org.hibernate.engine.spi.RowSelection; +import org.hibernate.type.StandardBasicTypes; /** * An SQL dialect for Firebird. @@ -34,6 +36,12 @@ import org.hibernate.engine.spi.RowSelection; * @author Reha CENANI */ public class FirebirdDialect extends InterbaseDialect { + + public FirebirdDialect() { + super(); + registerFunction( "replace", new SQLFunctionTemplate( StandardBasicTypes.STRING, "replace(?1, ?2, ?3)" ) ); + } + @Override public String getDropSequenceString(String sequenceName) { return "drop generator " + sequenceName;