Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative to fetch eager / lazy ? Performances issues #108

Open
t0F opened this issue Sep 9, 2016 · 0 comments
Open

Alternative to fetch eager / lazy ? Performances issues #108

t0F opened this issue Sep 9, 2016 · 0 comments

Comments

@t0F
Copy link

t0F commented Sep 9, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant