Hi everyone,
I've got a custom model function that gets titles to blog posts (and
their "belongs to" data e.g. author). I have related images as
"hasMany" but can't call them in a simple fashion...
I'm using this in the model:
$fields = array('blog.title', 'blog.date', 'author.name');
return $this->findAll($conditions, $fields, $order, $limit, null, 0);
This doesn't retrivev data from "hasMany" models, so then I use
another function in the Images model to get the relevant images.
Is there a way to do it all in the blogs model? Or have I done
something wrong?
Thanks in advance
TWIOF
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Cake PHP" 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
-~----------~----~----~----~------~----~------~--~---