0
我想在一個用戶的所有字段中設置null。 如果這是簡單的領域,例如:* @method用戶setGroups()設置當前記錄的「組」集合
* @method Users setNumber() Sets the current record's "number" value
然後我做:
$user = $query;
$user->setNumber(NULL);
$user->save();
這個工作不錯,但我想添加這個
* @method Users setGroups() Sets the current record's "Groups" collection
,但如果我做:
$user = $query;
$user->setNumer(NULL);
$user->setUsers(NULL);
$user->save();
我有錯誤:
Couldn't call Doctrine_Core::set(), second argument should be an instance of Doctrine_Collection when setting many-to-many references.
第二個參數必須如何?