I am having a bear of a time saving the simplest record from a model called ItemView:
if($this->save($this->data)) {
echo \'worked\';
} else {
echo
Wow, two miserable hours of my life wasted.
Remember that your beforeSave()
must return true
!
may be something like this
$this->Model->set($this->data);
$errors = $this->Model->validate();// or perhaps validationError(), please confirm
if(!$errors) {
$this->Model->save();
}else{
//show errors
pr($errors);
}