Skip to content

Conversation

@schauder
Copy link
Contributor

When columns have keywords as names that name must not be used as the name of bind parameters neither with nor without quotes.

https://jira.spring.io/browse/DATAJDBC-381

schauder added 2 commits May 27, 2019 08:29
When columns have keywords as names that name must not be used as the name of bind parameters neither with nor without quotes.
@schauder schauder requested a review from mp911de May 28, 2019 07:28
@mp911de
Copy link
Member

mp911de commented May 29, 2019

We shouldn't suggest escaping as part of the String column name in @Column but rather which makes it an implicit functionality but rather make it a first-class citizen. Possible approaches could be:

  1. Include reserved keywords as part of a Dialect and apply to escape where needed
  2. Have a escape attribute along with @Column(name ="virtual", forceQuote = true)

Allowing escape chars to be part of the column name opens a can of worms and can lead to ambiguity amongst column aliases as we remove characters relying on some sort of uniqueness amongst column names. To have this properly working we would need to determine alias names in the scope of an operation and correlate these back during parameter replacement/result set consumption.

@schauder
Copy link
Contributor Author

schauder commented Nov 1, 2019

After some internal discussion we decided to: escape everything but make this behaviour configurable since it might break existing usage.

@schauder
Copy link
Contributor Author

This issue got fixed by means of DATAJDBC-386

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants