Sorry ..
I wanna do a hasAndBelongsToMany relationship. Sorry for this..
I tried to use finderQuery, doing a find (one result) it's ok, but with
findAll don't runs...
On Fri, Feb 22, 2008 at 10:21 PM, BlenderStyle <[EMAIL PROTECTED]>
wrote:
>
> You might be able to do something like this in your Revision model:
>
> function getNegativeRevisions($user_id) {
> $conditions = array('user_id' => '<> '.$user.id);
> return $this->findAll($conditions);
> }
>
> Then, in your RevisionsController:
> $user_id = '5';
> $negative_revisions = $this->Revision->getNegativeRevisions($user_id);
>
> I didn't test that, but it seems logical.
>
> Matt Bowden
>
> On Feb 22, 2:30 pm, "Renan Gonçalves" <[EMAIL PROTECTED]> wrote:
> > Hello!
> >
> > I have a application that has two main models (User and Revision with
> > relationship User has many Revision).
> > I wanna to get all Revision that this User revised and all Revision that
> > this User don't revised. There are a way to get this information using
> the
> > relationships?
> >
> > Thanks!
> > --
> > Renan Gonçalves - Software Engineer
> > Cell Phone: +55 (11) 8633-6018
> > MSN: [EMAIL PROTECTED]
> > Web Site: renangoncalves.com
> > São Paulo - SP/Brazil
> >
>
--
Renan Gonçalves - Software Engineer
Cell Phone: +55 (11) 8633-6018
MSN: [EMAIL PROTECTED]
Web Site: renangoncalves.com
São Paulo - SP/Brazil
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---