Hi

I have a model where Paper and Author are in HABTM relation.  I also 
have a model for the join table AuthorsPaper.

When doing this operation (in a method of the Author model class)

$this->AuthorsPaper->updateAll(
                        array('author_id' => $first_author),
                        array('author_id' => $second_author)
                );

I'd like to avoid the join in the generated query, thus I put

$this->AuthorsPaper->recursive = -1;

but the joins are performed anyway...

Instead, if I do this (instead of setting recursive)

        $this->AuthorsPaper->unbindModel(
                array('belongsTo' => array('Paper'))
        );
        $this->AuthorsPaper->unbindModel(
                array('belongsTo' => array('Author'))
        );

the joins are not performed...

am I missing something?  Shouldn't this be the same of setting recursive 
to -1?

thanks in advance
        Lorenzo

-- 
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to