always encrypted with secure enclave not working for DETERMINISTIC in JDBC
I'm using commercial Azure SQL, the database created via the portal, with secure enclaves enabled. I created the CMK and CEK using MSSQL_JAVA_KEYSTORE with keystore jks file. when using jdbc to test query for like and =, if the encrypted column is of type ENCRYPTION_TYPE = Randomized then working, but if it is DETERMINISTIC
then got error below:
com.microsoft.sqlserver.jdbc.SQLServerException: Encryption scheme mismatch for columns/variables '@P0', 'SSN'. The encryption scheme for the columns/variables is (encryption_type = 'DETERMINISTIC', encryption_algorithm_name = 'AEAD_AES_256_CBC_HMAC_SHA_256', column_encryption_key_name = 'ECEK', column_encryption_key_database_name = 'enclave') and the expression near line '1' expects it to be RANDOMIZED, a BIN2 collation for string data types, and an enclave-enabled column encryption key, or PLAINTEXT.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:276)
..
the code snippet as:
SQLServerPreparedStatement pstmt = (SQLServerPreparedStatement) conn.prepareStatement("SELECT * FROM Employees WHERE SSN like ?");
pstmt.setString(1, "123%", true);
ResultSet rs = pstmt.executeQuery();