One thing that’s made programming on symfony very aggravating has been dealing with the forms. Some sections of the forms are not well documented. The main issue that I have with this at work is that we deal with GPS coordinates and the users enter their coordinates in degree-minute-seconds format but the database saves them in degree-decimal format.
I had googled for a solution to this problem before, but had not found anything to guide me to the answer. The couple answers I had found were not very clear on getting it to work. Till I found this. Following these guidelines I got it to work on a test deployment of symfony. Code below:
class Blog extends BaseBlog { /** * Initializes internal state of Blog object. * @see parent::__construct() */ public function __construct() { // Make sure that parent constructor is always invoked, since that // is where any default values for this object are set. parent::__construct(); } /* * this function overrides the BaseBlog::save function to allow * changes to be made to the object before saving to the database */ public function save(PropelPDO $con = null) { $this->setCommentCount('11'); return parent::save($con); } }
Till Next Time