cassandradatastaxdatastax-java-driverspring-data-cassandra

Spring data Cassandra converts the keyspace name and table names into lowercase


I'm trying to map existing Cassandra tables into java classes using spring data cassandra. The table names have uppercase letters, for example "MyTable". However, when I use @Table("MyTable"), spring data cassandra doesn't recognize the table because it treats the name as lowercase.

Is there any way to tell spring data cassandra to not convert the names into lowercase?

Sample code:

import org.springframework.data.cassandra.core.mapping.Table;

@Table("MyTable")
public class MyTable {

}

Solution

  • I was able to solve the problem by adding (forceQuote = true) to @Table annotation.

    @Table(value = "MyTable", forceQuote = true)
    public class MyTable {
    
    }