[NFR] Eager loading support of Phalcon\Mvc\Model
Once we use model, we always define relationships between models.
In most cases, we need to implement a list view, displaying objects with its foreign key field's value.
This will cause a N+1 selects problem (http://use-the-index-luke.com/sql/join/nested-loops-join-n1-problem), slowing down the performance.
So I think it is necessary to implement the eager loading feature of Phalcon\Mvc\Model.
+1
+1
+1
Your can use leftJoint at another ORM but in phalcon leftJoin relations isn`t selected to object only run in sql https://github.com/phalcon/cphalcon/issues/1111?
+1
+1
What's the status of this one? Or do I have to give up phalcon?..
+1
+1
+1
+1
Can we expect anything to happen with it? It's quite a basic feature I think, it should be handled with high priority if I may categorize its severity.
But at least a tiny feedback would be good about it to know if we can expect it to be implented or should learn a different ORM. Because without this feature this ORM handles only separate entities, not entities with relations. Lazy loading is only a tiny help but doesn't care about data integrity and mostly not about performance. But on the other hand, Phalcon is so good, should make its ORM to be usable as well, big +1 vote for this feature.
+1
+1
Is there an alternative to solving this N+1 problem?
I could think of creating stubs and populating explicitly joined data in those stubs, for other unavailable attributes I'd fall back to lazy loading/ load them once requested.
+1
+1
+1
+1
+1