Hello all,
2 models : model A - model B
1 controller : controller A
2 actions in controler A : action A - action B
I set a variable to false in a model B construct method :
$this->myVar = false;
I then in controller A have a main model A to which is associated
model B
in an action A I set the $this->modelA->modelB->myVar = true;
in this action I have a requestAction (for testing purposes) calling
action B
$this->requestAction('/controllerA/actionB');
if I 'pr' the $this->modelA->modelB->myVar it returns true when I
would expect it to return false since I would expect the instance of
the model to be a new one (since a new action is called).
The behaviour works as expected if I do the same on the main model.
It is like the instance of the associated model is the same for both
actions.
I don't know if I'm being clear but can anyone help on this ?
thanks in advance.
thomas
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---