Вот то, как сделать это на командной строке:
for file in `find . -name configure`; do
svn ps svn:executable yes ${file}
done
Или всего для одного файла (configure
имя файла здесь):
svn ps svn:executable yes configure
You should manually override the primary key field in the model (which is the right place to do this - the name of a primary key field is an attribute of the model, and not something that should be 'fudged' around in the controller.)
class Example extends AppModel { var $primaryKey = 'example_id'; // example_id is the field name in the database}
The above code is from http://book.cakephp.org/view/437/primaryKey
While the suggestion to turn off validation will work, it's not the right way to go about it.
Lastly, if you're setting model variables within a controller, you use $this->Model->set('attributeName',value) rather than $this->Model->attributeName
Похоже, контроллер истории проверял данные, и данные были недопустимыми. Добавление следующей строки в контроллер остановит проверку данных.
$this->Story->validate = array(); // Stop valadation on the story.
Я нашел решение на этой странице 15 основных советов по CakePHP