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.

Refreshing model metadata during development

Is there a way to reset the model metadata on every request?

This is possible for the views but I can't find in the docs to setup up the same thing for the model metadata.


You can use the Memory adapter for meta-data:


$di['modelsMetadata'] = function() {
    $metaData = new \Phalcon\Mvc\Model\MetaData\Memory();
    return $metaData;

I think if you don't set up any modelsMetadata, then the metaData gets refreshed every request.