Encrypted fields cannot be reliably used with APIs that depend on direct database value comparisons.
Because encrypted values are not stored in plain text, database-level comparisons cannot properly evaluate field values. As a result, APIs such as entityQuery(), EntityTypeManager::loadByProperties(), or direct database queries will not function as expected when filtering by encrypted fields.
This limitation should be more clearly documented to avoid developer confusion and incorrect assumptions about query behavior.
his MR updates the README.md file to clarify this limitation. The project page should also be updated to reflect the same information.
Issue fork field_encrypt-3575523
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
lester-barahona commentedComment #4
lester-barahona commentedComment #6
ptmkenny commentedChanging this to "minor" as it is a documentation issue and the project page already suggests that entity query does not work in the context of field constraints. That said, this is a good clarification and I will make the change now.
Comment #7
ptmkenny commentedComment #8
ptmkenny commentedComment #10
ptmkenny commented@lester-barahona Thank you for your contribution!