Hi Amitava,

I missed a crucial piece of info regarding:

> $users = $this->BidSession->User->find('list');
>
> you aren't asking cake to grab the users from a particular session,
> you are tunnelling directly to the User model and finding ALL users!
> The easiest way to get the Users for a particular BidSession is let
> cake do it for you by increasing the recursive level above 0 on the
> BidSession model. If you have linked up any users to a BidSession,
> they will automatically be retrieved by cake unless you ask them not
> to be when you find the BidSession record.

You'll need to turn the full users array into a list to use with a
select tag (drop down), so do this:

$bidSession = $this->BidSession->find('first', array(
        'conditions'=>array('BidSession.id'=>$session_id)
        'recursive'=>1
));

$this->set('users_list', Set::Combine($bidSession, '{n}.User.id',
'{n}.User.name'));

hth

jon

-- 

jon bennett
w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

--~--~---------~--~----~------------~-------~--~----~
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