You can use the "fields" option in the relation declaration (you can
also use bindModel prior to your findAll), or use the Bindable
behavior from Mariano in the Bakery.
hth

On Jan 7, 3:19 pm, metalseb <[EMAIL PROTECTED]> wrote:
> Hi list and all bakers out here. First post on the list !
>
> Well, since we are Jan. 7th, happy new year to everyone !
>
> I'm new to Cake and I'm stuck with such a thing :
>
> I have 3 models : b2b_item, shop_item and band_data
>
> b2b_item associated 1:1 with shop_item
> shop_item associated 1:1 with band_data
>
> So this is a 2-depth recursion.
>
> All is running fine using a findAll with no parameters and $recursive
> set to 2 in the top model. But since I get in return a huge number of
> fields and unuseful data for this purpose, I want to restrict the
> fields I get to b2b_item.id, shop_item.title, band_data.name. Cake
> crashes telling me that the band_data table name is unknown and I
> cannot find any turnaround to make the top model able to know about
> the top-1 level associated tables.
>
> I hope all this is clear. I already did some searches on the group but
> did not find any answer. Anybody could help ?
>
> Many thanxxx to all !
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to