Skip to content

Commit d61c9fd

Browse files
Resolve merge conflict in mongo-encryption.adoc.
Reconciled changes from main with the updated code sample that includes the required `keyId(...)` configuration for Queryable Encryption using the Range algorithm. Signed-off-by: Ricardo Mello <[email protected]>
1 parent 3e3086d commit d61c9fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/antora/modules/ROOT/pages/mongodb/mongo-encryption.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ BsonBinary signDK = clientEncryption.createDataKey("local", new com.mongodb.clie
149149
CollectionOptions collectionOptions = CollectionOptions.encryptedCollection(options -> options
150150
.encrypted(int32("pin"), pinDK)
151151
.queryable(encrypted(string("ssn")).algorithm("Indexed").keyId(ssnDK.asUuid()), equality().contention(0))
152-
.queryable(encrypted(int32("age")).algorithm("Range").keyId(ageDK.asUuid()), range().contention(8).min(0).max(150))
153-
.queryable(encrypted(int64("address.sign")).algorithm("Range").keyId(signDK.asUuid()), range().contention(2).min(-10L).max(10L))
152+
.queryable(encrypted(int32("age")).algorithm("Range").keyId(ageDK.asUuid()), range().contention(8).min(0).max(150))
153+
.queryable(encrypted(int64("address.sign")).algorithm("Range").keyId(signDK.asUuid()), range().contention(2).min(-10L).max(10L))
154154
);
155155
156156
mongoTemplate.createCollection(Patient.class, collectionOptions); <1>

0 commit comments

Comments
 (0)