On 7/18/06, Gustavo Carreno <[EMAIL PROTECTED]> wrote:
That's fine for retrieving data, but what about the manipulation of data in an associated model. Should I do this in the controller (calling on the associated model's methods from there)? Or in a custom method/interface in the currently active Model (as in the example above)?
Cheers,
Psychie
On 7/18/06, Sonic Baker <[EMAIL PROTECTED]> wrote:
>
> addItem($item_id)
> {
> ....
> ....
> $this->Sale->StockItem->decrementStockItem($item_id);
> ....
> ....
> }
Sale does not have any child class, it has a read() method that
returns an array of data, recordset alike, so you stop your train at
$this->Sale->read(); it get you a bag full of data you can the use at
will.
That's fine for retrieving data, but what about the manipulation of data in an associated model. Should I do this in the controller (calling on the associated model's methods from there)? Or in a custom method/interface in the currently active Model (as in the example above)?
Cheers,
Psychie
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---