I am trying to use Kundera for connecting to Cassandra. In my case I have an Entity X with Partition Key {A,B} and cluster key {C}.
We have multiple values of C for each A and B combination(primary key).
So in such case how should be define the entity?
@Embeddable
public class PrimayKey implements Serializable{
@Column(name = "A")
private String a;
@Column(name = "B")
private String b;
}
@Entity
@Table(name = "X")
public class X{
@EmbeddedId
private PrimayKey key;
@Column(name = "C")
private String c;
@Column(name = "D")
private String d;
}
Here if I go for a find by Primary Key its not working as we have multiple values of C and D for each A and B combination. In such case how should we define entity?