how does something that hasOne have ordering?
perhaps what you are looking for is a hasMany with an ordering and a limit of 1
On 9/2/06, Evan <[EMAIL PROTECTED]> wrote:
>
> 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'
>
>
> >
>
--
==
S. DeVore
(the old fart) the advice is free, the lack of crankiness will cost you
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---