title: How to manage hasMany relations which come up as empty from form? (CakePHP 3.x)
body: <p>I have tables on database. Venues, Venue Coordinators. Venue might have multiple coordinators. I have a form to save venue and its coordinators. But venues must be saved without coordinator infos sometimes. However when I do that, cakephp warns me: "Coordinator cannot be empty". Because yes, coordinator cannot be. But if coordinator inputs both are empty, I would like to ignore on table-side / event-side.</p>
  
  <p>For example I tried to delete it by using beforeMarshal() on Table object. didn't work.</p>
  
  <pre><code>public function beforeMarshal(Event $event, ArrayObject $data, ArrayObject $options)
      {
          if ($data['full_name'] == '' &amp;&amp; $data['phone_number'] == '') {
              unset($data);
          }
      }
  </code></pre>
  
  <p><strong>I want to do:</strong></p>
  
  <p>When I fill the venue form with coordinator input, it saves properly.
  When I fill the venue form without coordinator input. it saves venue properly without coordinator. Because coordinators are not necessary.</p>
  
  <p><a href="https://i.stack.imgur.com/wTBHW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wTBHW.png" alt="enter image description here"></a></p>