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

When use ShardingQueryAssistedEncryptor to find assistedQueryColumns, an outOfIndex exception will occur. #2205

Closed
tristaZero opened this issue Apr 15, 2019 · 0 comments · Fixed by #2206

Comments

@tristaZero
Copy link
Contributor

Here is the point:

ShardingEncryptorStrategy

/**
     * Get assisted query column.
     *
     * @param logicTableName logic table name
     * @param columnName column name
     * @return assisted query column
     */
    public Optional<String> getAssistedQueryColumn(final String logicTableName, final String columnName) {
        for (ColumnNode each : columns) {
            ColumnNode target = new ColumnNode(logicTableName, columnName);
            if (each.equals(target)) {
                return Optional.of(assistedQueryColumns.get(columns.indexOf(target)).getColumnName());
            }
        }
        return Optional.absent();
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant