I am using kundera 2.4 as my JPA interacton with Cassandra .
Created Column family in cassandra
create column family usageitem with key_validation_class = 'UTF8Type'
and comparator = 'UTF8Type' ;
The default validation class assumed by cassandra for a column is BytesType . I want to change it to UTF8Type via jpa entity
I do not want to change the above column definition to
create column family usageitem with key_validation_class =
'UTF8Type' and comparator = 'UTF8Type' and default_validation_class =
'UTF8Type' ;
because i do not want to touch my existing database definition
My JPA entity is looking something like this -
@Entity
@Table(name = "usageitem", schema = "TITAN@TROYUnit")
public class UsageItem {
@Id
@Column(name="record_id")
private String recordID;
@Column(name="provider_name",columnDefinition="UTF8Type")
private String providerName;
//Setters & Getters ....
}
So how should i specify the validation type of cassandra column value in the above JPA entity to insert data in utf8 or text format ?