1

Could anyone help please.

I need to know How to impelement the update @Query with IN operator while using spring data cassandra?

Because I want to use something like this: @Query("UPDATE objects SET children = ?0 WHERE id IN (?...)")

Ofc if it's possible. Might be I should use native data stax template for this kind of query.

Thx in advance

b3lowster
  • 415
  • 1
  • 6
  • 18
  • Actually it seems that a more accurate answer to your question was posted here: http://stackoverflow.com/questions/29418075/in-clause-with-spring-data-and-cassandra-query (although it's probably good to keep in mind what @jny wrote). – Michal M Sep 13 '15 at 15:19

1 Answers1

0

I am not sure how to implement it, but it is not recommended to use IN in queries with Cassandra ( see this blog for example). It will actually be slower than iterating through the ids and and calling update separately for every id using the standard query, e.g.

@Query("UPDATE objects SET children = ?0 WHERE id = ?1") 
jny
  • 8,007
  • 3
  • 37
  • 56