This text is replaced by the Flash movie.

Posts Tagged ‘cache’

Cake Baking Models – Cannot see other tables

November 7th, 2009

Problem.
After I updated the database, I added 1 table; relate it to another table, and go to the command line to bake what I did, after typing "cake bake model" at the command prompt, I found out that the recently added table was not listed.

Cake PHP Bake Model Problem

 

Reason.
Cake caches your model schema. 

Solution.
1.) 
Clear your cache by deleting all files in your app's tmp/cache/models/
and tmp/cache/persistent/

2.) 
Disable caching in your app's config/core.php // make sure to enable back again in production setup

/**
 * Turn off all caching application-wide.  *  
 */  
Configure::write('Cache.disable', true);

After doing the solution, I can now successfully bake the new table.