I probably should have described what causes the error. When I use findAll on the view, with no extra parameters, things work fine. When I add an "order" clause the innermost array loses the name of the model.
Without ordering in my findAll call Array ( [0] => Array ( [SampleImageView] => Array ( [id] => 11 [added_by_user_id] => 1 With ordering in my findAll call Array ( [0] => Array ( [0] => Array ( [id] => 11 [added_by_user_id] => 1 Once it's written out like this the problem and solution becomes obvious(my excuse is it's 2am) - change $image['ModelName'] to $image[0] Hope this helps someone out, and maybe someone will work out a patch one day. Cheers Tim On May 11, 2:02 am, Tim W <[EMAIL PROTECTED]> wrote: > Hi all, > > I've just spent a hour or so tracking down an issue before realising > it was caused by pointing cake at a view instead of a database table. > In general views work with Cake, but in some seemingly random cases > they fail. > > The problem i've run into was identified and a patch suggested in this > conversation (subject "ake FindAll mysql view occured errors" if the > link doesn't work) > > http://groups.google.com/group/cake-php/browse_thread/thread/e747844d... > > Is there any more recent information or workarounds? I don't like to > change the cake core as it makes upgrading more difficult - i'm on > version 1.2.0.6311 beta. > > Thanks > > Tim --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---