You can use recursive or unbind whenever you want to unbind associations from models. This is very useful because there are cases when you want to execute a simple query and you do not want to join other tables. Here comes unbind. Unbind allows us to unbind all but some model associations. On the other hand if you want to unbind all associations you can use recursive like this:
PHP:
-
$this->Model->recursive = -1;
CakePHP is beautiful. I love it!
0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.