Avoid conversion for Range objects used in query methods.

We should not inspect Range for conversion as this leads to entity creation.

Closes #1140.
This commit is contained in:
Mark Paluch
2021-06-10 09:47:56 +02:00
parent f7ea4832f9
commit 7e60db71db

View File

@@ -24,6 +24,7 @@ import org.springframework.data.cassandra.core.cql.QueryOptions;
import org.springframework.data.cassandra.core.mapping.CassandraPersistentProperty;
import org.springframework.data.cassandra.core.mapping.CassandraType;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Range;
import org.springframework.data.domain.Sort;
import org.springframework.lang.Nullable;
@@ -154,6 +155,10 @@ class ConvertingParameterAccessor implements CassandraParameterAccessor {
return null;
}
if (bindableValue instanceof Range) {
return bindableValue;
}
CassandraType cassandraType = this.delegate.findCassandraType(index);
if (cassandraType != null) {