Skip to content

queries do not retrieve Encrypted fields #2057

Closed
@mikereiche

Description

@mikereiche

The problem is that spring-data-couchbase generates the fields to project using the names in the class instead of the 'enc$name' names which are in the stored document. All the non-ById methods will have this problem.

the work-around is to override the find queries in the repository and project b.* instead of the individual property names. Use #n1ql.collection or #n1ql.bucket as appropriate.

@query("SELECT META().cas AS __cas, META().id AS __id, b.* FROM #{#n1ql.collection} b where #{#n1ql.filter}")
List findAll();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions