How to you extend a cakePHP project so it can use a new field in the database?
I just given a CakePHP Project that I am trying to extend the model to include a new field
clear cache at /app/tmp/cache
if raising debug level to 2 or 3 is not working.
check if, on using debug($Model), shows your new field under schema attribute of model.
In CakePHP application, whenever you add a new field or modify the structure in database, you should delete all files inside YourApplication/app/tmp/cache/models folder.
Whenever you do any database change follow the following steps :
Whenever you make any changes to your database, please make sure that your app/config/core.php
file debug value is 2. Configure::write('debug', 2);
If it is 0 database changes will not be detected.
You can also delete cache file if your database changes are not working.
path of your application\app\tmp\cache\models
Quite a bit later, but I was looking for a way to do this today in Cake 3.x. Easiest way, imo:
bin/cake orm_cache build
which will rebuild the cache w/ the current db structure.
Or to just clear w/o rebuild:
bin/cake orm_cache clear
http://book.cakephp.org/3.0/en/console-and-shells/orm-cache.html