-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
HHH-9271 - IdentityGenerator broken with quoted identifiers #1301
Conversation
"unrecognized id type : " + type.getName() + " -> " + clazz.getName() | ||
); | ||
catch (SQLException e) { | ||
if(Identifier.isQuoted( identifier )) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless I am mistaken... that identifier, if quoted, would be surrounded by the Dialect's quoting chars. Identifier#isQuoted
is checking the "source form" or quoting (with one additional pattern check). In other words, Identifier#isQuoted
will match name
, [name] and "name". But it would not match, e.g., 'name'. I think it might be better to check here using Dialect#openQuote()
and Dialect#closeQuote()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked it and the Identifier#isQuoted
verifies all the currently supported quoting characters: `, [, and ". As far as I know, there cannot be a 'name' because there is no Dialect to use such a quoting syntax. More, the single quote syntax is reserved for Strings in SQL.
7249bc2
to
c374703
Compare
Ok, when a new/custom Dialect uses a different quote character and we get a On Tue, Mar 22, 2016 at 5:31 AM Vlad Mihalcea notifications@github.com
|
But there are other places where |
Show me where Identifier#isQuoted is used to check names that Dialect has You have to remember that there are 2 forms of "quoted".. (1) the source On Tue, Mar 22, 2016, 8:12 AM Vlad Mihalcea notifications@github.com
|
I'm going to change it to use what you've suggested previously. But in the case a new Dialect comes with a new quote symbol, is it true that we will not add it to the |
Fix for HHH-9271