Commit 735dbc45 authored by Madhura Bhave's avatar Madhura Bhave

Change default for new_generator_mappings to true

Closes gh-7612
parent aff1f18f
......@@ -202,7 +202,7 @@ public class JpaProperties {
this.useNewIdGeneratorMappings.toString());
}
else if (!result.containsKey(USE_NEW_ID_GENERATOR_MAPPINGS)) {
result.put(USE_NEW_ID_GENERATOR_MAPPINGS, "false");
result.put(USE_NEW_ID_GENERATOR_MAPPINGS, "true");
}
}
......
......@@ -108,17 +108,17 @@ public class JpaPropertiesTests {
Map<String, String> hibernateProperties = properties
.getHibernateProperties(mockStandaloneDataSource());
assertThat(hibernateProperties)
.containsEntry(AvailableSettings.USE_NEW_ID_GENERATOR_MAPPINGS, "false");
.containsEntry(AvailableSettings.USE_NEW_ID_GENERATOR_MAPPINGS, "true");
}
@Test
public void useNewIdGeneratorMappingsTrue() throws Exception {
public void useNewIdGeneratorMappingsFalse() throws Exception {
JpaProperties properties = load(
"spring.jpa.hibernate.use-new-id-generator-mappings:true");
"spring.jpa.hibernate.use-new-id-generator-mappings:false");
Map<String, String> hibernateProperties = properties
.getHibernateProperties(mockStandaloneDataSource());
assertThat(hibernateProperties)
.containsEntry(AvailableSettings.USE_NEW_ID_GENERATOR_MAPPINGS, "true");
.containsEntry(AvailableSettings.USE_NEW_ID_GENERATOR_MAPPINGS, "false");
}
@Test
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment