symfony/symfony — pull request #10151 by peterrehm (2014-01-28 09:37:22+00:00)
Title: [Form] Update DateTime objects only if the actual value has changed

| Q | A
| ------------- | ---
| Bug fix? | [yes]
| New feature? | [no]
| BC breaks? | [no]
| Deprecations? | [no]
| Tests pass? | [yes]
| Fixed tickets | -
| License | MIT
| Doc PR | -

Right now the Form component replaces DateTime fields with new Objects, therefore the hash is changing.
This leads to unnecessary database updated when working with doctrine. With this patch the DateTime object
of the actual entity is only replaced if the value has been changed.