Skip to content

Alternative to fetch eager / lazy ? Performances issues #108

@t0F

Description

@t0F

Hi,
I have some entities with properties relations to a second node :

Class MainNode (
    /**
     * @OGM\ManyToOne(relation="linkSecondNode")
     */
    protected $secondNode;

    /**
     *
     * @return mixed
     */
    public function getSecondNode() {
        return $this->secondNode;
    }

When I make a query to return a list of MainNodes, and then use the getSecondNode method, I have poor performances. I assume that's because it need a query to get the secondNode data the first time we use the method.

In doctrine you can add a "fetch" annotations to define what need to be return by query.
Is there a way to make something like that, in order to get all data need in one query ?
Thanks for your time.

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