We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2f305ca commit 7dcb994Copy full SHA for 7dcb994
source/includes/qe-tutorials/php/queryable-encryption-helpers.php
@@ -190,6 +190,14 @@ function createEncryptedCollection(
190
): void
191
{
192
try {
193
+ // This should be done in the createEncryptedCollection method
194
+ foreach ($encryptedFieldsMap['encryptedFields']['fields'] as &$field) {
195
+ if (!isset($field['keyId'])) {
196
+ $keyId = $clientEncryption->createDataKey($kmsProviderName, $customerMasterKeyCredentials);
197
+ $field['keyId'] = $keyId;
198
+ }
199
200
+
201
// start-create-encrypted-collection
202
$client->getDatabase($encryptedDatabase)->createEncryptedCollection(
203
$encryptedCollectionName,
0 commit comments