Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I added a new column "features" to the site table and regenerated the models using Doctrine.
This code is causing an error:

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

Exception:

Unknown column "s.features" in field list.....

I checked the database and it contains the field, I also checked the Site model and the table definition contains the column information. The primary key of all tables is id. Also in the line which throws the exception I am not using the newly added column. If I remove the column from the table definition of the site object then the above code works...

This error is happening to any table when I add a new column and regenerate the models from it.

like image 972
rahul Avatar asked Jul 16 '10 05:07

rahul


1 Answers

Do you checked the generated Base Table Classes ? Should be BaseSite.class.php

./doctrine build-all

should fix the Problem.

like image 157
ridcully Avatar answered Sep 21 '22 01:09

ridcully