In my schema for a members table I have the default value for country set to 223. The BaseMembers.php class contains a setCountry method. This method flags the column as modified if it is not equal to the previous value. It also flags the column as modified if it is equal to the default value, even if the value has not been changed. Why would it do this? This is causing the country field to be updated in the update queries when it actually hasn't been changed. I was able to override this by modifing the function and placing it into the Members class, but I'm really wondering why it's setup like this.
/** * Set the value of [country] column. * * @param int $v new value * @return Members The current object (for fluent API support) */ public function setCountry($v) { if ($v !== null) { $v = (int) $v; } if ($this->country !== $v || $v === 223) { // < $v === 223 is the problem code $this->country = $v; $this->modifiedColumns[] = MembersPeer::COUNTRY; } if ($this->aCountries !== null && $this->aCountries->getId() !== $v) { $this->aCountries = null; } return $this; } // setCountry() --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---