title: Spring Data using Entity class name instead of @Table("table_name") in query for Cassandra
body: <p>In a new project I have to use <code>Cassandra</code> as persistence layer.</p>
  
  <p>I'm using <code>Spring Data</code> repositories to run queries. My entity looks like below</p>
  
  <pre class="lang-java prettyprint-override"><code>@Table("my_customer")
  public class CustomerEntity {
      @PrimaryKey
      private Long id;
      ....
  }
  </code></pre>
  
  <p>When I try to get number of rows in this table using <code>repository.count()</code> it throws following exception</p>
  
  <pre><code>org.springframework.data.cassandra.CassandraInvalidQueryException: Query; CQL [SELECT count(*) FROM customerentity;]; unconfigured table customerentity; nested exception is com.datastax.driver.core.exceptions.InvalidQueryException: unconfigured table customerentity
      at org.springframework.data.cassandra.core.cql.CassandraExceptionTranslator.translate(CassandraExceptionTranslator.java:139)
      at org.springframework.data.cassandra.core.cql.CassandraAccessor.translate(CassandraAccessor.java:334)
      at org.springframework.data.cassandra.core.cql.CqlTemplate.translateException(CqlTemplate.java:732)
      at org.springframework.data.cassandra.core.cql.CqlTemplate.query(CqlTemplate.java:298)
  </code></pre>
  
  <p>It seems like spring is not detecting table name mentioned in <code>@Table("my_customer")</code> to run the query. It should be using <code>my_customer</code> instead of <code>customerentity</code> as table name in query.</p>
  
  <p>Am I doing something wrong? It works perfectly fine with <code>JPA</code> repositories for relational database. I have also tried annotating the entity class with <code>@Entity(name = "my_customer")</code> with no luck. (I know it would only affect <code>CQL/JPQL</code>)</p>