0
votes

So I am new to Cassandra but I am experimenting some strange issues:

I run this simple query from a cassandra client:

select * from emps where causality ='bb4148ef-e9ff-4794-9ab2-d0e55a005d59'

And I get one record. Now I have a java repository implementation that is running the same query without any exception or errors and I am getting "null" back, even if I can see that the generate query is correct

2022-07-28T18:55:19.122+0300 DEBUG Executing CQL Statement [select * from emps where causality = ?]

Even more if I remove the where statement everything is working: select * from empswhere limit 1

Here is my repository

@Repository
public interface CassandraUserSpinRepository extends CassandraRepository<Emps, String> {
    // works correctly 
    //@Query("select * from emps limit 1")
    // 
    // returning null even if a record exist in db
    // i check and causality parameter is sended correctly
    @Query("select * from emps where causality = :causality")
    SpinResult findByCausality(@Param("causality") String causality);
}

Has anyone some idea what could be wrong here?