Index: lib/plugins/sfDoctrinePlugin/lib/record/sfDoctrineRecord.class.php =================================================================== --- lib/plugins/sfDoctrinePlugin/lib/record/sfDoctrineRecord.class.php (revision 15902) +++ lib/plugins/sfDoctrinePlugin/lib/record/sfDoctrineRecord.class.php (working copy) @@ -25,6 +25,17 @@ $_initialized = false, $_defaultCulture = 'en'; + /** + * by jonathan wage during phpday2009 (IT) + */ + public function removeReference($name) + { + if (isset($this->_references[$name])) + { + unset($this->_references[$name]); + } + } + /** * Custom Doctrine_Record constructor. * Used to initialize I18n to make sure the culture is set from symfony @@ -192,4 +203,4 @@ return parent::__call($method, $arguments); } } -} \ No newline at end of file +} Index: lib/plugins/sfDoctrinePlugin/data/generator/sfDoctrineForm/default/template/sfDoctrineFormGeneratedTemplate.php =================================================================== --- lib/plugins/sfDoctrinePlugin/data/generator/sfDoctrineForm/default/template/sfDoctrineFormGeneratedTemplate.php (revision 15902) +++ lib/plugins/sfDoctrinePlugin/data/generator/sfDoctrineForm/default/template/sfDoctrineFormGeneratedTemplate.php (working copy) @@ -72,6 +72,20 @@ protected function doSave($con = null) { + + + + +getManyToManyRelations() as $relation): ?> + $this->object->removeReference('getOption('name') ?>'); + $this->object->removeReference('getAlias() ?>'); + + + + + + + parent::doSave($con); getManyToManyRelations() as $relation): ?> @@ -109,4 +123,4 @@ -} \ No newline at end of file +}