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
IGNITE-9606: JDBC getPrimaryKeys() returns wrong value for COLUMN_NAME #4906
Conversation
Earlier, if key was of SQL type (so not wrapped), corresponding property thought that it is not a key. This behaviour affected what COLUMN_NAME JDBC metadata would contain.
isKeyField = false; | ||
if (isKeyClsSqlType) | ||
// In case of field is neither composite nor wrapped, it is a key, if it equal to keyFieldName. | ||
isKeyField = entry.getKey().equals(qryEntity.getKeyFieldName()); | ||
else | ||
isKeyField = (hasKeyFields ? keyFields.contains(entry.getKey()) : null); |
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.
Could someone explain, when we need to set isKeyField
to null
?
isKeyField = false; | ||
if (isKeyClsSqlType) | ||
// In case of field is neither composite nor wrapped, it is a key, if it equal to keyFieldName. | ||
isKeyField = entry.getKey().equals(qryEntity.getKeyFieldName()); |
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.
is it correct that you check it case sensitive?
prop.name() used to return UPPERCASED name of the field. So comparison with keyFieldName/valueFieldName (which are not uppercased) was incorrect. Probably, this validation logic should be revisited.
Used aliases map instead of normalizing keyFieldName all the time.
Afrer review, decieded to fix problem in another way |
…ta. This closes apache#4906. This closes apache#4948.
…ta. This closes apache#4906. This closes apache#4948.
No description provided.