Change the join type to an outer join instead of an inner join.  In order
to do this within your controller before you make the query you will need
to flip either your belongsTo or hasMany depending on which way you have
your model set up.

On Mon, Oct 22, 2012 at 12:27 PM, lowpass <[email protected]> wrote:

> I think the simplest approach would be to use counterCache. Then you
> could do a find on Categories where the count is 0.
>
> On Mon, Oct 22, 2012 at 1:00 PM, ecko usil <[email protected]> wrote:
> > Categories has many articles. How can I get list all categories with
> > conditions categories doesn't have any articles?
> >
> > thanks in advance.
> > regards ucil
> >
> > --
> > Like Us on FaceBook https://www.facebook.com/CakePHP
> > Find us on Twitter http://twitter.com/CakePHP
> >
> > ---
> > You received this message because you are subscribed to the Google Groups
> > "CakePHP" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected].
> > Visit this group at http://groups.google.com/group/cake-php?hl=en.
> >
> >
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
>
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en.


Reply via email to