I spent a lot of time looking for a better solution too, but couldn't
come up with something good. So my solution is similar to Augusto's in
that I override Model::delete to check for soft-deleted models (models
with a deleted = true column value):
public function delete($id = null, $cascade = true) {
$deleted = parent::delete($id, $cascade);
return $deleted || ($this->hasField('deleted') &&
$this->findByIdAndDeleted($id, true));
}
On 2013-03-13 3:27 AM, David Yell wrote:
> Is there an acceptable way to organise this in 2.x? I'd really rather
> not look for a false in my controller to feedback to the user. I guess
> using Augusto's method will be okay as a stopgap. --
> You received this message because you are subscribed to the Google
> Groups "cakephp-core" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
cakephp-core...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>