Request action isn't *that* bad ;-)
In this case request action should be fine as you wont be calling it
very often (as opposed to say from in an element that is displayed on
every page).
That said, Graham's suggestion is a better solution.
Note, to get the best performance from requestAction
You try to use saveAll?
On Mon, Feb 2, 2009 at 10:16 AM, Graham Weldon gra...@grahamweldon.comwrote:
If some association exists between these objects, you can do something
like:
$this-User-save($this-data);
$this-User-Site-save(array('Site' = array(
'user_id' = $this-User-id,
//
Hello all
What's an appropriate use of requestAction()?
I have 3 controllers:
* UsersController
* SiteController
* SitePagesController
Within the add() function of UsersController, I want to (a) create a
new user (b) create a new site for that user with (c) one new page for
that site.
If some association exists between these objects, you can do something
like:
$this-User-save($this-data);
$this-User-Site-save(array('Site' = array(
'user_id' = $this-User-id,
// --- any other data
)));
$this-User-Site-SitePage-save(array('SitePage' = array(
'site_id' =