I would substitute 'pioneer' for 'non-conventional' :)

By falling back on the fields array you are only putting off the
situation where you need contain fields from models more than 1 level
deep.  It's great that you can move forward, but I would still
recommend getting to grips with contain .. it is very easy (add a
behavior and add contain array to your find params - est voila).

HTH, Paul.

On Nov 8, 5:58 pm, Tomfox Wiranata <[email protected]> wrote:
> i guess that makes me a pioneer then :)
>
> cause none of it worked i abandoned the contain solution here and used
> the fields param instead. works perfectly. no idea why it came to me
> sooo damn late....
>
> thanks for your help guys :)
>
> On 8 Nov., 09:32, WebbedIT <[email protected]> wrote:
>
>
>
>
>
>
>
> > @Tomfox: I've not seen people specify conditions and order params in
> > that way before.  It should be:
>
> > $this->Link->find('all', array(
> >   'conditions'=>array('Link.created'=>$lastLink, 'Link.fk_user_id'=>
> > $id),
> >   'order'=>array('Link.created DESC'),
> >   'limit'=>2,
> >   'contain'=>array('Icon')
> > ));
>
> > Do you have the containable behaviour loaded.  What SQL does the above
> > create?
>
> > @Zuha: I have seen your threads about Containable and CakePHP 2, the
> > first one was a file naming convention issue and the second seems to
> > be solely linked to one plugin (you say yourself it works everywhere
> > else in your app).  Plenty of people are using CakePHP 2 without
> > issues involving containable so I suggest there may be something wrong
> > with your plugin setup.
>
> > HTH, Paul.
>
> > On Nov 7, 7:19 pm, zuha <[email protected]> wrote:
>
> > > I had this problem once and it was because the contain behavior wasn't
> > > being called (due to app_model not being named AppModel where I was 
> > > setting
> > > the actsAs containable setting)
>
> > > But I had it happen again, when it was being called and it still didn't
> > > work.  Contain is pretty buggy now if you ask me.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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