that works fine! although i cant seem to constrain the number of fields select either by contain or fields...
On Aug 1, 10:52 am, Martin Kirchgessner <[email protected]> wrote: > Did you try to use the "recursive" param? I think you should call : > > $news->find('all', array("recursive" => 2)); > > "recusive" defaults to 1, meaning it will get data from news and its > associated models (organisations_user). That's why you don't have User > and Organisation. By setting it to 2 find will also get fields from > models associated to organisations_user. > > Hope this helps, > > Martin > > On 31 juil, 16:34, johan <[email protected]> wrote: > > > > > Ive got a small problem with my cakephp app... > > > I have in my design a habtm as a central table wich several other > > table relates to. > > This due to that Users can be members of different organisations over > > time > > > news belongsTo organisations_user > > organisations_user hasOne user, organisation > > user hasAndBelongsToMany organisations > > > Problem I have is that, when using $news->find('all') i dont get any > > data from user och organisation > > > Is there any way to pull data from theese two tables via this > > relationship? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
