From fa14d4fb7038b46e77581c35488e13bc1ad7a0f7 Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Fri, 31 Jul 2015 15:44:06 -0500 Subject: [PATCH] HHH-9917 - 'value' is not a reserved word on Derby --- .../org/hibernate/dialect/DerbyDialect.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/DerbyDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/DerbyDialect.java index 894c040488..333955c0ad 100755 --- a/hibernate-core/src/main/java/org/hibernate/dialect/DerbyDialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/DerbyDialect.java @@ -7,6 +7,8 @@ package org.hibernate.dialect; import java.lang.reflect.Method; +import java.sql.DatabaseMetaData; +import java.sql.SQLException; import java.sql.Types; import java.util.Locale; @@ -16,6 +18,9 @@ import org.hibernate.dialect.function.DerbyConcatFunction; import org.hibernate.dialect.pagination.AbstractLimitHandler; import org.hibernate.dialect.pagination.LimitHandler; import org.hibernate.dialect.pagination.LimitHelper; +import org.hibernate.engine.jdbc.env.spi.AnsiSqlKeywords; +import org.hibernate.engine.jdbc.env.spi.IdentifierHelper; +import org.hibernate.engine.jdbc.env.spi.IdentifierHelperBuilder; import org.hibernate.engine.spi.RowSelection; import org.hibernate.internal.CoreMessageLogger; import org.hibernate.internal.util.ReflectHelper; @@ -320,4 +325,16 @@ public class DerbyDialect extends DB2Dialect { } } + @Override + public IdentifierHelper buildIdentifierHelper( + IdentifierHelperBuilder builder, DatabaseMetaData dbMetaData) throws SQLException { + builder.applyIdentifierCasing( dbMetaData ); + + builder.applyReservedWords( dbMetaData ); + builder.applyReservedWords( getKeywords() ); + + builder.setNameQualifierSupport( getNameQualifierSupport() ); + + return builder.build(); + } }