on-internet
← Community

Spring Boot Cassandra Repository With Composite Primary Key & Not Using Seperate Key Class

Stack Overflow ·

I am using Spring boot cassandra entity classes and repositories, many of my entities/tables have composite primary keys or multiple columns that create the primary key and when extending Spring Data Repository interface the Primary Key has to be a single object which requires me to create a separate key class annotated with @PrimaryKey and doing that distracts or prevents me from having a single entity class which I want, to keep it simple and have all the columns from the table in the same class. Is it possible to have the three fields below that make a composite primary key in the same enti

Comments

Sign in or sign up to comment and upvote.

No comments yet.