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.

Model instead of Row


when you select something from database with predefined column set, you get Row instead of Model. Is there any simple way to convert Row to Model? Or maybe it's possible to force get Model instead of Row?

edited Feb '20

No there is not. You will always have Row instance returned if you use columns. Phalcon doesn't provide partial models, you can only select full models because of how Active Record works.

Most likely in next Phalcon version when we will proide DataMapper there will be such option.