Skip to content

No Encryption on partial load with QueryBuilder #37

Description

@Tanktiger

Hi,

i've build a DQL query where i want to select only a partial from my entity and this partial is not encrypted.

$query = $em->createQueryBuilder()
            ->from(Offer::class, 'o')
            ->select('PARTIAL o.{id}')
            ->leftJoin('o.assocEntity', 'ae')
            ->addSelect('PARTIAL ae.{id, encryptedField}')
            ->setMaxResults(1)
        ;

        $result = $query ->getQuery()->getArrayResult();

I'm getting the ids and the assoc entity with the fields but the encrypted field is not decrypted.

[0] => [
    ['id'] => 1
    ['assocEntity'] => [
        ['id'] => 100,
        ['encryptedField'] => "b1B2WTVtZzJZRkRsOGJBSHlXc21BcE5nb ....",
    ]
]

How i can fix this or could this be fixed in this bundle pls?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions