Skip to content

Using references on embedded document field #1837

Open
@MatTheCat

Description

@MatTheCat
Q A
New Feature yes
RFC no
BC Break no

The query builder should allow queries like

->field('memberships.organization')->references($organization)

Currently I'm forced to know how the reference is stored and then write

->field('memberships.organization')->equals(new \MongoId($organization->getMongoId()))

This is because Doctrine\ODM\MongoDB\Query\Expr::getReferenceMapping only checks field mapping.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions