-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
- Do you want to request a feature or report a bug?
bug
public interface SubstationRepository extends CassandraRepository<SubstationEntity, String> {
public class SubstationEntity {
@PrimaryKeyColumn(ordinal = 0, type = PrimaryKeyType.PARTITIONED)
private String country;
@PrimaryKeyColumn(ordinal = 1, type = PrimaryKeyType.CLUSTERED)
private String id;
The second type parameter (ID) is wrong in the SubstationRepository and LineRepository
-
What is the current behavior?
findById doesn't work for SubstationRepository and LineRepository -
What is the expected behavior?
should work -
What is the motivation / use case for changing the behavior?
reduce technical debt, methods should work
Need to use https://stackoverflow.com/questions/44468888/spring-data-cassandra-how-to-query-tables-with-compound-keys
The easy solution is just to use MapId in the second generic type of the repositories. Maybe add a static method to create MapIds with the correct fields.
Or go full typing and create the primary key class, but it sounds more verbose for little value
Metadata
Metadata
Assignees
Labels
No labels