Further update: I am getting to the bottom of this, but could still do
with a pointer or two.

In my AppController I have a __AuthExtra() method which requests extra
data to be added into the session.  I am calling this on my User model
but I am using contain and I'm containing the Person model as follows:

function __AuthExtra() {
  $auth = $this->Session->read('Auth');
  $data = ClassRegistry::init('User')->find('first', array(
    'conditions' => array('User.id'=>$auth['User']['person_id']),
    'contain' => array( 'Person' => array('OnlineAddress.parent_model
= \'Person\'', 'OnlineAddress.type_id = 54', 'Organisation'=>array
('Cause')) )
  ));
  $this->Session->write('Auth', Set::merge($auth, $data));
}

I assume that containable must do some sort of caching as my find call
from Person::view is using the contain associations specified in
AppController::__AuthExtra() rather than those I specify in subsequent
calls?!?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to