We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

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.

Column 'storage' is not part of column map

Hey guys,

like the topic said, I've got a problem with a Model.

I developed my Site on my localhost with MAMP and everything just works as expected. Now I uploaded all files to my webhost and ex-/imported my database. And now on my webserver I get this error:

Column 'storage' is not part of the column map

And I don't know why, because I didn't change anything on my code or database. If I take a look into the Modelfile where this error comes from, everything is ok:

 * Independent Column Mapping.
public function columnMap()
    return array(
    'id' => 'id', 
    'name' => 'name', 
    'description' => 'description', 
    'att' => 'att', 
    'hp' => 'hp', 
    'shield' => 'shield', 
    'speed' => 'speed', 
    'storage' => 'storage',
    'sprit' => 'sprit', 
    'metal' => 'metal', 
    'silicium' => 'silicium'

I already restarted my apache and nginx, but the problem is still there.

Hope someone can help me to fix this.



What models meta-data adapter are you using?

Also, you can freely remove that column map from your model if you aren't renaming any column.

edited Sep '14

I'm using

    use Phalcon\Mvc\Model\Metadata\Memory as MetaDataAdapter;

     * If the configuration specify the use of metadata adapter use it or use memory otherwise
    $di->set('modelsMetadata', function () {
    return new MetaDataAdapter();

I commented column map out. Still the same error..


Found out that this request produces the error, but I don't know why.

        $ships = Ships::find(array(
            'id > 10'
            /*'cache' => array(
                'key' => 'attships',
                'lifetime' => 86400

edited Jun '15

Isn't this a bug? I experienced the same thing today.

It is maybe a caching problem. Strange behaviour. Sometimes it fixes it self. Sometimes you try it few hours later and everything works, or you generate the model again


I'm glad I found this post. I needed a sanity check.