Skip to content

Commit db6fdf2

Browse files
committed
Adopt to deprecated QueryMethod constructor
1 parent e6fe49d commit db6fdf2

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/query/JdbcQueryMethod.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public JdbcQueryMethod(Method method, RepositoryMetadata metadata, ProjectionFac
6767
NamedQueries namedQueries,
6868
MappingContext<? extends RelationalPersistentEntity<?>, ? extends RelationalPersistentProperty> mappingContext) {
6969

70-
super(method, metadata, factory);
70+
super(method, metadata, factory, JdbcParameters::new);
7171
this.namedQueries = namedQueries;
7272
this.method = method;
7373
this.mappingContext = mappingContext;

spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/query/R2dbcQueryMethod.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public class R2dbcQueryMethod extends QueryMethod {
8383
public R2dbcQueryMethod(Method method, RepositoryMetadata metadata, ProjectionFactory projectionFactory,
8484
MappingContext<? extends RelationalPersistentEntity<?>, ? extends RelationalPersistentProperty> mappingContext) {
8585

86-
super(method, metadata, projectionFactory);
86+
super(method, metadata, projectionFactory, RelationalParameters::new);
8787

8888
Assert.notNull(mappingContext, "MappingContext must not be null");
8989

spring-data-relational/src/test/java/org/springframework/data/relational/repository/query/CriteriaFactoryUnitTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ private QueryMethod getQueryMethod(String methodName, Class<?>... parameterTypes
7878
throw new RuntimeException(e);
7979
}
8080
return new QueryMethod(method, new DefaultRepositoryMetadata(UserRepository.class),
81-
new SpelAwareProxyProjectionFactory());
81+
new SpelAwareProxyProjectionFactory(), null);
8282
}
8383

8484
private RelationalParametersParameterAccessor getAccessor(QueryMethod queryMethod, Object... values) {

spring-data-relational/src/test/java/org/springframework/data/relational/repository/query/ParameterMetadataProviderUnitTests.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import org.springframework.data.repository.Repository;
2929
import org.springframework.data.repository.core.RepositoryMetadata;
3030
import org.springframework.data.repository.core.support.DefaultRepositoryMetadata;
31+
import org.springframework.data.repository.query.DefaultParameters;
3132
import org.springframework.data.repository.query.QueryMethod;
3233
import org.springframework.data.repository.query.parser.PartTree;
3334

@@ -82,7 +83,7 @@ private ParameterMetadata getParameterMetadata(String methodName, Object value)
8283
static class RelationalQueryMethod extends QueryMethod {
8384

8485
public RelationalQueryMethod(Method method, RepositoryMetadata metadata, ProjectionFactory factory) {
85-
super(method, metadata, factory);
86+
super(method, metadata, factory, null);
8687
}
8788
}
8889

0 commit comments

Comments
 (0)