Using symfony 1.2.7 w/sfDoctrinePlugin and upgrading to Doctrine 1.1.x, many-to-many relationship handling doesnt work any more, while saving a Doctrine form.
Possible reason: in Doctrine 1.1.x Doctrin_Record::link() and ::unlink() methods were extended by a new parameter: now = false which prevents handling relationships right in the database by default.
Either reordering the parent::doSave($con) with many-to-many relation's saveXXXX method calls or extending the link(), unlink() methods with $now = true parameter in the generator sfDoctrineFormGeneratedTemplate.php could be a solution.
protected function doSave($con = null)
{
<?php foreach ($this->getManyToManyRelations() as $relation): ?>
$this->save<?php echo $relation['alias'] ?>List($con);
<?php endforeach; ?>
parent::doSave($con);
}
Unfortunately these changes would brake the default plugin w/Doctrine 1.0.x :( wouldnt they?
This is propably a related ticket to this problem:
http://trac.symfony-project.org/ticket/6285