title: TYPO3 v10.4 - Incorrect integer value during persistence
body: <p>I try to update a task from TYPO3 9.5 to 10.4 (extending AbstractTask - not Symfony Command).
  Now I get this error message:</p>
  
  <pre><code>Execution of task "Blah Import" failed with the following message: Incorrect integer value: '' for column `db`.`tx_blubb_domain_model_organisation`.`organisation_group` at row 1
  </code></pre>
  
  <p>I've tried many different things but I cannot solve this error...
  In the TCA of the organisation, for the field organisation_group there is definitly 'default' => 0 set.</p>
  
  <p>The Database field is set in ext_tables.sql like:</p>
  
  <pre><code>organisation_group int(11) unsigned default '0' not null
  </code></pre>
  
  <p>The Organisation Group is an ObjectStorage, the error appears when $this->persistenceManager->persistAll() is called.
  If I debug the organisation one line before persistation, everything looks good to me.</p>
  
  <p>Any ideas where I can search?</p>
  
  <p>Before anyone suggests it - disabling the DB strict mode is no option :)</p>
  
  <p>EDIT:<br>
  This Message tells me, maybe I don't have to search in TCA. This field got deleted from ext_tables.sql and renamed by the DB compare tool.
  After it was renamed, the error still is triggered by this field. So, I'll now start to delete all fields and let TYPO3 create it again. Maybe there is only a misconfiguration of some fields in the database.
  <a href="https://i.stack.imgur.com/AJs7c.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AJs7c.png" alt="Error with deleted field"></a></p>
  
  <p>EDIT 2:<br>
  Now I can run this task, when I remove the field <code>organisation_group</code> from the TCA.<br>
  All other fields (+/- 10) that throws the same error, could be fixed by deleting and recreate, or by allowing <code>null</code> in e.g. <code>field_xy text null,</code>.</p>
  
  <p>Only the field <code>organisatio_group</code>, still throws the error when I reenable it in TCA.</p>
  
  <p>Here's the TCA - maybe anyone have another idea :/ </p>
  
  <pre><code>'organisation_group' =&gt; [
      'exclude' =&gt; 1,
      'label' =&gt; '...',
      'description' =&gt; '...',
      'config' =&gt; [
          'type' =&gt; 'select',
          'renderType' =&gt; 'selectSingle',
          'items' =&gt; [
              ['', 0]
          ],
          'foreign_table' =&gt; 'tx_blah_domain_model_organisationgroup',
          'size' =&gt; 1,
          'default' =&gt; 0,
          'eval' =&gt; 'int'
      ],
  ],
  </code></pre>