@@ -42,7 +42,6 @@ import org.springframework.data.jdbc.core.convert.RelationResolver;
|
||||
import org.springframework.data.mapping.callback.EntityCallbacks;
|
||||
import org.springframework.data.relational.core.conversion.MutableAggregateChange;
|
||||
import org.springframework.data.relational.core.mapping.Column;
|
||||
import org.springframework.data.relational.core.mapping.NamingStrategy;
|
||||
import org.springframework.data.relational.core.mapping.RelationalMappingContext;
|
||||
import org.springframework.data.relational.core.mapping.event.AfterConvertCallback;
|
||||
import org.springframework.data.relational.core.mapping.event.AfterDeleteCallback;
|
||||
@@ -72,7 +71,7 @@ public class JdbcAggregateTemplateUnitTests {
|
||||
@BeforeEach
|
||||
public void setUp() {
|
||||
|
||||
RelationalMappingContext mappingContext = new RelationalMappingContext(NamingStrategy.INSTANCE);
|
||||
RelationalMappingContext mappingContext = new RelationalMappingContext();
|
||||
JdbcConverter converter = new BasicJdbcConverter(mappingContext, relationResolver);
|
||||
|
||||
template = new JdbcAggregateTemplate(eventPublisher, mappingContext, converter, dataAccessStrategy);
|
||||
|
||||
@@ -54,6 +54,7 @@ import org.springframework.data.annotation.Transient;
|
||||
import org.springframework.data.jdbc.core.mapping.AggregateReference;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.mapping.PersistentPropertyPath;
|
||||
import org.springframework.data.relational.core.mapping.DefaultNamingStrategy;
|
||||
import org.springframework.data.relational.core.mapping.Embedded;
|
||||
import org.springframework.data.relational.core.mapping.Embedded.OnEmpty;
|
||||
import org.springframework.data.relational.core.mapping.NamingStrategy;
|
||||
@@ -847,7 +848,7 @@ public class EntityRowMapperUnitTests {
|
||||
}
|
||||
|
||||
private <T> EntityRowMapper<T> createRowMapper(Class<T> type) {
|
||||
return createRowMapper(type, NamingStrategy.INSTANCE);
|
||||
return createRowMapper(type, DefaultNamingStrategy.INSTANCE);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.relational.core.mapping.DefaultNamingStrategy;
|
||||
import org.springframework.data.relational.core.mapping.NamingStrategy;
|
||||
import org.springframework.data.relational.core.mapping.RelationalPersistentEntity;
|
||||
|
||||
@@ -36,9 +37,9 @@ import org.springframework.data.relational.core.mapping.RelationalPersistentEnti
|
||||
* @author Jens Schauder
|
||||
* @author Mark Paluch
|
||||
*/
|
||||
public class NamingStrategyUnitTests {
|
||||
public class DefaultNamingStrategyUnitTests {
|
||||
|
||||
private final NamingStrategy target = NamingStrategy.INSTANCE;
|
||||
private final NamingStrategy target = DefaultNamingStrategy.INSTANCE;
|
||||
|
||||
private final RelationalPersistentEntity<?> persistentEntity = //
|
||||
new JdbcMappingContext(target).getRequiredPersistentEntity(DummyEntity.class);
|
||||
@@ -41,6 +41,7 @@ import org.springframework.data.jdbc.repository.config.DialectResolver;
|
||||
import org.springframework.data.jdbc.repository.support.JdbcRepositoryFactory;
|
||||
import org.springframework.data.mapping.model.SimpleTypeHolder;
|
||||
import org.springframework.data.relational.core.dialect.Dialect;
|
||||
import org.springframework.data.relational.core.mapping.DefaultNamingStrategy;
|
||||
import org.springframework.data.relational.core.mapping.NamingStrategy;
|
||||
import org.springframework.data.relational.core.mapping.RelationalMappingContext;
|
||||
import org.springframework.data.repository.core.NamedQueries;
|
||||
@@ -114,7 +115,7 @@ public class TestConfiguration {
|
||||
@Bean
|
||||
JdbcMappingContext jdbcMappingContext(Optional<NamingStrategy> namingStrategy, CustomConversions conversions) {
|
||||
|
||||
JdbcMappingContext mappingContext = new JdbcMappingContext(namingStrategy.orElse(NamingStrategy.INSTANCE));
|
||||
JdbcMappingContext mappingContext = new JdbcMappingContext(namingStrategy.orElse(DefaultNamingStrategy.INSTANCE));
|
||||
mappingContext.setSimpleTypeHolder(conversions.getSimpleTypeHolder());
|
||||
return mappingContext;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user