Skip to content

Add overloads to CassandraBatchOperations.insert(…) accepting WriteOptions #1135

Closed
@MichalFab

Description

@MichalFab

When using CassandraBatchOperations with WriteOptions I get:
com.datastax.oss.driver.api.core.type.codec.CodecNotFoundException: Codec not found for requested operation: [null <-> org.springframework.data.cassandra.core.cql.ExecutionProfileResolver$$Lambda$1007/555149775]:

WriteOptions ttlOption = WriteOptions.builder().ttl(ttl).build(); CassandraBatchOperations batchOperations = cassandraTemplate.batchOps(); batchOperations.insert(entity, ttlOption).execute();

The exception occurs in the QueryBuilder.class. From what I can see, ExecutionProfileResolver is added to the entity object so mapping does not work properly.

Used version:

org.springframework.boot
spring-boot-starter-data-cassandra
2.4.6

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions