First of all, thanks for trying to help me. Cake version I'm using is
1.2.0.5875 pre-beta and cannot update right now.

Who said it was a loop, I think was right. I enabled display errors
and this is the message on the browser:

Fatal error: Maximum execution time of 30 seconds exceeded in /home/
vhost/ruid.com/cake/libs/model/datasources/dbo_source.php on line 778

The corresponding code around is:

if ($type == 'hasAndBelongsToMany') {
        $merge = array();
        foreach($fetch as $j => $data) {
>>>>> if(isset($data[$with]) && $data[$with][$foreignKey] === 
>>>>> $row[$model->name][$model->primaryKey]) {
                        if ($habtmFieldsCount > 2) {
                                $merge[] = $data;
                        } else {
                                $merge[] = Set::diff($data, array($with => 
$data[$with]));
                        }
                }
        }
        if (empty($merge) && !isset($row[$association])) {
                $row[$association] = $merge;
        } else {
                $this->__mergeAssociation($resultSet[$i], $merge, $association,
$type);
        }
} else ...

and belongs to:
DboSource::queryAssociation(&$model, &$linkModel, $type, $association,
$assocData, &$queryData, $external = false, &$resultSet, $recursive,
$stack)

More info about the model I'm using:

var $name = 'Article';

var $validate = array(
  'name' => VALID_NOT_EMPTY,
  'user_id' => VALID_NOT_EMPTY
);

var $belongsTo = array('User');
var $hasMany = array('Comments');
var $hasAndBelongsToMany = array(
              'Tag' => array(
                      'className' => 'Tag',
                      'joinTable' => 'articles_tags',
                      'foreignKey' => 'article_id',
                      'associationForeignKey' => 'tag_id',
                      'with' => 'ArticlesTags',
                      'unique' => false // important to set this so
cake does not auto-delete records on update
              )
 );


--~--~---------~--~----~------------~-------~--~----~
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