<p dir="auto">I can't believe this isn't available in Symfony2?</p>
<p dir="auto">I want to give my API the ability to just update one attribute instead of having all the attributes and relations when updating a resource.</p>
<p dir="auto">I know there's this workaround <a href="https://gist.github.com/makasim/3720535">https://gist.github.com/makasim/3720535</a><br>
but I'm not sure where to implement that Listener.</p>
<p dir="auto"><code class="notranslate">bind</code>ing partial parameters effectively clears all existing values from the model and only persists the new parameters that are passed in.  See example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// Author.php
class Author
{
    public $name;
    public $email = 'bar';
}

// AuthorType
...
$builder-&gt;add('name', 'text')-&gt;author('text');
..."><pre class="notranslate"><code class="notranslate">// Author.php
class Author
{
    public $name;
    public $email = 'bar';
}

// AuthorType
...
$builder-&gt;add('name', 'text')-&gt;author('text');
...
</code></pre></div>
<p dir="auto">Passing <code class="notranslate">$form-&gt;bind(array('name' =&gt; 'foo'))</code> wipes out the existing <code class="notranslate">email</code> value.</p>