Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force quote everywhere configuration needed [DATACASS-695] #865

Closed
spring-projects-issues opened this issue Oct 25, 2019 · 2 comments
Closed
Assignees

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Oct 25, 2019

Hurelhuyag opened DATACASS-695 and commented

Currently forceQuote only supported annotation level. But no one want to use @Column(forceQuote=true) on every property on project.
If we don't use it, it will lowercase everywhere. Until now it was fine. But we need to use spark as filtering, aggregation engine. But spark don't lowercase any column name.

If spring-data-cassandra quoted every column name everywhere, Everyone will be happy.

We need something like spring.data.cassandra.forceQuoteEverywhere=true global configuration property for just for cassandra's silly behaviour


Affects: 2.2 GA (Moore)

Issue Links:

  • DATACASS-84 Provide support for naming strategies

  • DATACASS-656 Upgrade to Cassandra Driver 4.3
    ("is superseded by")

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Oct 25, 2019

Mark Paluch commented

That's an extension we would have to introduce in the mapping meta-model. We had the idea of introducing a NamingStrategy (see DATACASS-84) for quite a while that would accept the property name/column name and turn it into a CqlIdentifier. It would make sense to put it into CassandraMappingContext and associate BasicCassandraPersistentProperty with a NamingStrategy.

Spring Data already comes with a org.springframework.data.mapping.model.FieldNamingStrategy, so we would need to wrap that one into a Cassandra-specific strategy that enforces quoting for your particular case

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Feb 12, 2020

Mark Paluch commented

This issue was addressed during the migration to Cassandra driver 4 and its built-in CqlIdentifier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants