I've tried specifying the conditions for the associated model in the
find call without much luck.

$this->Team->find("Team.id = $id");

However I don't want to it return all the Users associated with that
team so I tried the following:-

$this->set('data', $this->Team->find("Team.id = $id OR User.id =
$user_id");

However that yields the error: SQL Error in model Team: 1109: Unknown
table 'User' in where clause

I get the feeling it's probably simpler for me just to grab the Member
model directly and look and its team list, but I am interested if I can
do it this.

Samuel DeVore wrote:
> then what you are probably looking for is bindModel and unbindModel  look at
> some of the listings at http://cakephp.org/search?q=bindModel  (cakebaker
> has a nice overview)  you can also have conditions in your findAll and find
> calls
>


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

Reply via email to