Hello, I have encountered a strange problem. With debug set to 1 or 2, the
query shown below returns the expected results in an array. With debug set
to 0, the ListItem.Item.ItemImage dimension of the array is empty.

    $list = $this->BalistikList->find('all',
      array(
        'conditions' => array('BalistikList.slug' => $slug,
'BalistikList.site_id' => Configure::read('site_id')),
        'contain' => array('User', 'ListDescription', 'ListItem',
'ListItem.Item', 'ListItem.User', 'ListItem.ListItemDescription',
'ListItem.Item.ItemImage', 'ListItem.Item.ItemVideo', 'ListComment',
'ListComment.User')
      )
    );

Here is a condensed description of the model associations:

BalistikList hasMany ListItem
ListItem belongsTo Item, BalistikList
Item hasMany ListItem, ItemImage, ItemVideo

Under what circumstances, if any, should changing the debug setting alter
the results of a find()?

What I find particularly strange about this is that ItemImage and ItemVideo
are essentially the same, yet ItemVideo behaves has expected and ItemImage
is acting strange.


-- 
View this message in context: 
http://n2.nabble.com/Model%3A%3Afind-returns-different-results-under-different-debug-settings-%28possible-bug-%29-tp1562429p1562429.html
Sent from the CakePHP mailing list archive at Nabble.com.


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

Reply via email to