spring-projects / spring-data-cassandra

Provides support to increase developer productivity in Java when using Apache Cassandra. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.
https://spring.io/projects/spring-data-cassandra/
Apache License 2.0
379 stars 311 forks source link

Split metadata verifier for Entities and PrimaryKey types [DATACASS-258] #433

Closed spring-projects-issues closed 7 years ago

spring-projects-issues commented 8 years ago

Mark Paluch opened DATACASS-258 and commented

Currently one metadata verifier (BasicCassandraPersistentEntityMetadataVerifier) is used to check for several cases (Has @Table annotation, has @PrimaryKeyClass annotation) with one method. The issue is that errors are reported back in a confusing way to the user:

Cassandra entities must have the @Table, @Persistent or @PrimaryKeyClass Annotation

Split the verifier into multiple verifications that are used according to the expected type and improve error messages


Issue Links:

Referenced from: pull request https://github.com/spring-projects/spring-data-cassandra/pull/83, and commits https://github.com/spring-projects/spring-data-cassandra/commit/c3700eede34393cdc24f6714921fe79d21bbaf95, https://github.com/spring-projects/spring-data-cassandra/commit/fac43233728d40f3510deac8c962535ea537b29f, https://github.com/spring-projects/spring-data-cassandra/commit/e238e483fc0b337c218dc3183766635884217b63, https://github.com/spring-projects/spring-data-cassandra/commit/3e8f984be49a4d758147173e87833fef4ca92fe2

spring-projects-issues commented 8 years ago

Mark Paluch commented

We should rethink also about logging here as logging always the exception and throwing it is discouraged

spring-projects-issues commented 7 years ago

John Blum commented

SD Cassandara PR 83 reviewed, polished and merged to master