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.

New row in Model is not being readed

I made a new row in my database table.

However it seems that Phalcon dosent see this column as existing. I then deleted the metaData folder, too see if that changes anything?

Now when I insert something in the model the public function validation() dosent run.

Did i do anything wrong, and how do i disable the cache in dev mode

edited 18d ago

This is how I do it in my Bootstrap file.

// Cache Model meta data only in production
if ($config->debug === false) {
    $di->setShared('modelsMetadata', function() use ($config) {
        return new \Phalcon\Mvc\Model\MetaData\Files([
            'lifetime' => 86400,
            'metaDataDir' => $config->site->path->cache . 'models-metadata/'

Thanks for your reply

The problem is that i deleted the folder content of metaData. After that the validation() function dosent run anymore?


I am so sorry

I was not getting the validation() function, becuase i did forget to add the new column to the values that I insert. I found out this by using the getMessages to see if i was missing something.

Hope you understand, but thanks for the reply.

You deleted the whole folder or its content only? If first - create it again, Im suprised that you dont get an exception.