Say I have a product table in Kassandra and UDT Information
Create table Product{
id text,
details map<text,<frozen<Information>>,
detailsMore list<frozen<Information>>
}
Create Type Information{
info1 text,
info2 text
}
For them, I have two classes in Java as
@Table
Class Product{
String id;
Map<String, Information> details;
List<Information> details;
}
@UserDefinedType('Information')
Class Information{
String info1;
String info2;
}
Now I retrieve data using CRUDRepository (spring), and now I love
Product prodObj = repo.find(id);
Now this prodObj contains data like
details map<String,UDTValue>,
detailsMore list<Information>
Why is the user type converted to Information in the case of the List, but was not converted in the case of the Map? Or am I doing something wrong? . If I directly try to assign this UDTValue Information Card, I get the following exception (obviously). java.lang.ClassCastException: com.datastax.driver.core.UDTValue cannot be passed to Information