Working with virtual fields in Cake1.3

1

In earlier versions of CakePHP we had to use Behaviors like "MultipleDisplayFields" or whatever. With $Model->virtualFields it is now possible to natively use find() methods combined with virtual fields. The nice thing about it is, that the pagination can work…

Working with models

0

Since there is so much to talk about it here, I will cut right to the chase. We all know about "Fat Models, Slim Controllers". So basically, as much as possible of the code should be in the model. For…

Validating multiple models at once

1

There are forms where you want to add/edit not only fields of the current model, but also of a related one (usually hasMany or belongsTo). Example: User and Post $this->Post->set($this->data); $this->Post->User->set($this->data); $val1 = $this->Post->validates(); $val2 = $this->Post->User->validates(); if ($val1 &&…