次のようにモデルPostとモデルがComment関連付けられているとします。
Post hasMany Comment
Comment belongsTo Post
関連する latest を使用find('all')して every を取得するにはどうすればよいですか?PostComment
hasOne私は関係を次のように定義しようとしPostました:
var $hasOne = array('LatestComment' => array('className' => 'Comment', 'order' => 'LatestComment.created DESC'));
しかし、私が a を行うと、ごとに 1 回、異なるに設定して、複数回Post->find('all')ごとに返されます。PostCommentLatestCommentComments