After I add some columns to the table, my model can’t find those new columns but can find the existing ones.
For example, suppose I add a point column to the user table, and column name is existed one.
$foo = ORM::factory('user',1);
$foo->name; // it's ok
$foo->point; // would throw exception:The :property property does not exist in the :class class
$foo->reload();
$foo->point; // would work
As you see, if I add reload() before I fetch the new column, it would work. But I really don’t think this is the right way to do that. And I changed the schema before, there was no problem.Looking for a permanent solution..
I figure out how to solve this issue.
Just delete all the files in the directory:
cache/.kohana/, that is the place where kohana keep the cache of the database schema.