1
votes

I am trying Cassandra with Spring

I have the Table and Persistence Object, Works Well.

With Cassandra (CQL script) I can make a sentence with: update ...,set ..., where, .. if ..,

My question is If I can use Spring Cassandra Operation (org.springframework.data.cassandra.core.CassandraOperation) with an Additional "If Sentence".

I want to have a version column and Work with Optimistic Locking (I dont Know yet if this is the best way)

1

1 Answers

3
votes

Spring Data does not support lightweight transactions (IF clauses). You'll have to build com.datastax.driver.core.Statements and execute them with CqlOperations.