We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Models\Phalcon\Mvc\Model\Query' not found

I have a problem when inserting data through a model in a multimodule application.

Apparently the database connection is much ok and I can select the database table content to controller through the same model.

The strange thing is I can't insert.



31.2k
Accepted
answer

So happy I managed to get around.

This is what I did;

    $query = "";
     $db = $this->getDI()->get('db')->prepare($query);

      $results = $db->execute();

Probably you have to prepend a \ before Phalcon\Mvc\Model\Query: \Phalcon\Mvc\Model\Query