Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Get Model Query with nested relationship

Hi Im using phalcon ORM and I want to get (fr example) all vehicles in my db but I want the relationship nested like the method (with()) do it in Laravel please hope u can help me!

There is eager loading available in incubator if you really want this.



434

There is eager loading available in incubator if you really want this. whats that??? eager loading ??



434
Accepted
answer
edited Jun '19

solved by myself you need to add $vehicles->setHydrateMode( \Phalcon\Mvc\Model\Resultset\Complex::HYDRATE_ARRAYS ); after your query execute.

    and then all your object will be array nested include the relationship

    (very confused , dont like it.)