Skip to content

Commit 7e5f094

Browse files
committed
Avoid conversion for Range objects used in query methods.
We should not inspect Range for conversion as this leads to entity creation. Closes #1140.
1 parent 6a4dddd commit 7e5f094

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

spring-data-cassandra/src/main/java/org/springframework/data/cassandra/repository/query/ConvertingParameterAccessor.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import org.springframework.data.cassandra.core.mapping.CassandraPersistentProperty;
2525
import org.springframework.data.cassandra.core.mapping.CassandraType;
2626
import org.springframework.data.domain.Pageable;
27+
import org.springframework.data.domain.Range;
2728
import org.springframework.data.domain.Sort;
2829
import org.springframework.lang.Nullable;
2930

@@ -154,6 +155,10 @@ Object potentiallyConvert(int index, @Nullable Object bindableValue, @Nullable C
154155
return null;
155156
}
156157

158+
if (bindableValue instanceof Range) {
159+
return bindableValue;
160+
}
161+
157162
CassandraType cassandraType = this.delegate.findCassandraType(index);
158163

159164
if (cassandraType != null) {

0 commit comments

Comments
 (0)