incubator icon indicating copy to clipboard operation
incubator copied to clipboard

Use the model->columns() method to return className as Phalcon\Mvc\ model \Row

Open sowork opened this issue 5 years ago • 1 comments

Phalcon\Mvc\Model\EagerLoading\Loader::__construct() $className: Method will not get the real model class

When I use the model cloumns method to restrict query columns, instead of returning the original model class, I return a Phalcon\Mvc\model\Row, which prevents me from preloading with the with method.

sowork avatar May 31 '19 09:05 sowork

I think the second argument from the Loader::fromResultset() can pass the model name,I solved it this way

sowork avatar Jun 05 '19 03:06 sowork