@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