I defined my model with this association:

class Topic extends AppModel
{
        var $name = 'Topic';

        var $hasOne = array(
                'LatestPost'    => array(
                        'className'     => 'Post',
                        'order'         => 'LatestPost.created DESC'
                )
        );
}

And yet I get this on the SQL debug:

SELECT `LatestPost`.`id`, `LatestPost`.`title`, `LatestPost`.`content`,
`LatestPost`.`topic_id`, `LatestPost`.`user_id`,
`LatestPost`.`created`, `LatestPost`.`modified` FROM `posts` AS
`LatestPost` WHERE 1 = 1 AND `LatestPost`.`topic_id` = '13'


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

Reply via email to