Skip to content

I want to use the same table field for both assistedQuery and likeQuery #38693

@daoxincc

Description

@daoxincc

Question

I want to use the same table field for both assistedQuery and likeQuery,I know it doesn't sound reasonable.
But I want to know if it is possible to remove duplicate field names when generating the actual SQL, when I set two configurations to have the same fields

version

<dependency>
    <groupId>org.apache.shardingsphere</groupId>
    <artifactId>shardingsphere-jdbc</artifactId>
    <version>5.5.3</version>
</dependency>

config

rules:
  - !ENCRYPT
    tables:
      member:
        columns:
          val:
            cipher:
              name: val
              encryptorName: aes_encryptor
            assistedQuery:
              name: assisted_val
              encryptorName: like_encryptor
            likeQuery:
              name: assisted_val
              encryptorName: like_encryptor

when I use this config, I will got an error

Caused by: java.sql.SQLSyntaxErrorException: Column 'assisted_val' specified twice

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions