HHH-10014 - Adjust default for hibernate.auto_quote_keyword to false
This commit is contained in:
parent
45dd596c4f
commit
54a3bb244a
|
@ -9,7 +9,7 @@ package org.hibernate.test.jdbc.env;
|
|||
import org.hibernate.boot.model.naming.Identifier;
|
||||
import org.hibernate.boot.registry.StandardServiceRegistry;
|
||||
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
|
||||
import org.hibernate.engine.jdbc.env.spi.AnsiSqlKeywords;
|
||||
import org.hibernate.cfg.AvailableSettings;
|
||||
import org.hibernate.engine.jdbc.env.spi.JdbcEnvironment;
|
||||
|
||||
import org.hibernate.testing.TestForIssue;
|
||||
|
@ -28,7 +28,9 @@ public class TestKeywordRecognition extends BaseUnitTestCase {
|
|||
|
||||
@Before
|
||||
public void prepareServiveRegistry() {
|
||||
serviceRegistry = new StandardServiceRegistryBuilder().build();
|
||||
serviceRegistry = new StandardServiceRegistryBuilder()
|
||||
.applySetting( AvailableSettings.KEYWORD_AUTO_QUOTING_ENABLED, "true" )
|
||||
.build();
|
||||
}
|
||||
|
||||
@After
|
||||
|
|
|
@ -18,6 +18,8 @@ import org.hibernate.Query;
|
|||
import org.hibernate.SQLQuery;
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.Transaction;
|
||||
import org.hibernate.cfg.AvailableSettings;
|
||||
import org.hibernate.cfg.Configuration;
|
||||
import org.hibernate.dialect.Dialect;
|
||||
import org.hibernate.dialect.HSQLDialect;
|
||||
import org.hibernate.dialect.MySQLDialect;
|
||||
|
@ -42,6 +44,13 @@ public class SQLLoaderTest extends LegacyTestCase {
|
|||
static int nextInt = 1;
|
||||
static long nextLong = 1;
|
||||
|
||||
@Override
|
||||
public void configure(Configuration cfg) {
|
||||
super.configure( cfg );
|
||||
|
||||
cfg.setProperty( AvailableSettings.KEYWORD_AUTO_QUOTING_ENABLED, "true" );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getMappings() {
|
||||
return new String[] {
|
||||
|
|
|
@ -68,7 +68,7 @@ public class LegacyJpaNamingWithAnnotationBindingTests extends BaseAnnotationBin
|
|||
|
||||
@Override
|
||||
protected void validateOrderPrimaryTableName(String name) {
|
||||
assertEquals( "`Order`", name );
|
||||
assertEquals( "Order", name );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -172,7 +172,7 @@ public class LegacyJpaNamingWithAnnotationBindingTests extends BaseAnnotationBin
|
|||
|
||||
@Override
|
||||
protected void validateCustomerOrdersTableName(String name) {
|
||||
assertEquals( "`Order`", name );
|
||||
assertEquals( "Order", name );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -74,8 +74,7 @@ public class LegacyJpaNamingWithHbmBindingTests extends BaseHbmBindingTests {
|
|||
|
||||
@Override
|
||||
protected void validateOrderPrimaryTableName(String name) {
|
||||
// quoted because "order" is an ansi sql keyword
|
||||
assertEquals( "`Order`", name );
|
||||
assertEquals( "Order", name );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -175,8 +174,7 @@ public class LegacyJpaNamingWithHbmBindingTests extends BaseHbmBindingTests {
|
|||
|
||||
@Override
|
||||
protected void validateCustomerOrdersTableName(String name) {
|
||||
// quoted because "order" is an ansi sql keyword
|
||||
assertEquals( "`Order`", name );
|
||||
assertEquals( "Order", name );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue