title: Undefined index in Entity's getter even though index is defined in contructor
body: <p>I have an entity class with the following information:</p>
  
  <pre><code>class A
  {
      ...
      private $share_data;
      public function __construct()
      {
          $this-&gt;share_data = array(
              'title' =&gt; null,
              'text' =&gt; null,
              'image' =&gt; null,
              'tab_image' =&gt; null
          );
      }
      ...
      public function getTabImage()
      {
          return $this-&gt;share_data['tab_image'];
      }
  </code></pre>
  
  <p>When I contruct a form with Symfony's form builder, I use the following code:</p>
  
  <pre><code>$builder-&gt;add('tab_image', 'text', array('required'=&gt;false, 'mapped'=&gt;true, 'label'=&gt;'a.form.tab.image_url'))
  </code></pre>
  
  <p>So when I try to run my code I get the error <strong>Notice: Undefined index: tab_image in...</strong></p>
  
  <p>I figured this was because in my database I have the column type as json_array (called share_data), so setShareData will be called. In the database value only title, text and image fields are defined in the json object. So the object is probably being overwritten to an array without the tab_image key. I tried to fix this by changing setShareData to the following:</p>
  
  <pre><code>public function setShareData($shareData)
  {
      // merge so that null values are default
      $this-&gt;share_data = array_merge($this-&gt;share_data, $shareData);
  
      return $this;
  }
  </code></pre>
  
  <p>hoping it would preserve the tab_index key set in the contructor. But I'm still getting the Undefined index error. Is there any way to keep the tab_image key as null when it's not set?</p>
  
  <p>I would like to fix this so that I can possibly add new keys to the array/json object without having to check if isset in each getter. Obviously newly created objects get the tab_image key, but I would like this to be backwards compatible.</p>