Doctrine Column not found: 1054 Unknown column 's.features' in' list of fields' '

I added a new “function” column to the site table and updated the models using Doctrine.
This code throws an error:

$siteTable = Doctrine_Core::getTable("Site"); $site = $siteTable->findOneByName("site"); // this line is throwing an exception 

An exception:

Unknown column "s.features" in the list of fields .....

I checked the database and contained this field, I also checked the site model, and the table definition contains information about the columns. The primary key of all tables is id . Also in the row that throws the exception, I am not using the newly added column. If I remove a column from the site object table definition, then the above code works ...

This error occurs with any table when I add a new column and regenerate models from it.

+7
php mysql mysql-error-1054 doctrine
source share
2 answers

Have you checked the generated base table classes? Must be BaseSite.class.php

 ./doctrine build-all 

should fix the problem.

+1
source share

check this command
goo doctrine catalog
there should be bin / and Doctrine / directories

 php bin/doctrine orm:generate-proxies 
0
source share

All Articles