Created
December 30, 2009 12:55
-
-
Save wowo/266024 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* class generated by symfony framework (v.1.2) with Doctrine 1.0 | |
* after switching to doctrine 1.1 objects saved in admin generated modules won't include many-to-many relations | |
* the solution is to overload doSave method and swap two lines below | |
* | |
* let me know if you have better idea :-) twitter.com/sznapka | |
*/ | |
class BasePackageForm extends BaseFormDoctrine | |
{ | |
protected function doSave($con = null) | |
{ | |
parent::doSave($con); | |
$this->saveshipmentsList($con); //bug here, this won't save shipments list (M:N) relation | |
} | |
} | |
/** | |
* fixed class | |
*/ | |
class PackageForm extends BasePackageForm | |
{ | |
protected function doSave($con = null) | |
{ | |
$this->saveshipmentsList($con); //workaround :-) | |
parent::doSave($con); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment