spring-projects / spring-data-cassandra

Provides support to increase developer productivity in Java when using Apache Cassandra. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.
https://spring.io/projects/spring-data-cassandra/
Apache License 2.0
374 stars 310 forks source link

Revise simple query and update value conversion #1384

Closed mp911de closed 1 year ago

mp911de commented 1 year ago

Right now, we do not correctly convert simple values associated with properties. For example:

class Foo {
  long bar;
}

Query.query(Criteria.where("bar").is(1))

The bar value remains integer and Cassandra rejects such a value because it does not match the column type.

Out of #1383, we discovered that we do not apply conversion for values associated with a property although we have all metadata in place.

Also, repository queries apply conversion twice which might interfere with double value conversion. Beyond that, double-conversion is not necessary. We should fix the issue.