title: TYPO3 extension: attaching an object to an objectstorage throws a MySQL database error
body: <p>One of my TYPO3 extension classes uses a property (checklist) that is an object storage.</p>
  
  <pre><code>class Kaufmnnisch extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
  {
  
      public function __construct(){
  
          $this-&gt;checklist = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
  
  
  
      }
  
  
      /**
       * checklist
       *
       * @var Tx_Extbase_Persistence_ObjectStorage
       * @lazy
       */
      protected $checklist;
  
   /**
       * Returns the checklist
       *
       * @return Tx_Extbase_Persistence_ObjectStorage $checklist
       */
      public function getChecklist()
      {
          return $this-&gt;checklist;
      }
  
      /**
       * Sets the checklist
       *
       * @param Tx_Extbase_Persistence_ObjectStorage $checklist
       * @return void
       */
      public function setChecklist($checklist)
      {
          $this-&gt;checklist = $checklist;
      }
  
      /**
       * Returns the boolean state of checklist
       *
       * @return bool
       */
      public function isChecklist()
      {
          return $this-&gt;checklist;
      }
  </code></pre>
  
  <p>To that object storage i want to be able to add objects of the class 'Checkobject' which has just two propeties: 'name' and 'checked'...
  Within the controller of the class i have following code in the createAction:</p>
  
  <pre><code>$Kundenauftragliegtvor = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('...\Kundentermine\Domain\Model\Checkobject');
          $Kundenauftragliegtvor-&gt;setName('Kundenauftrag liegt vor');
          $Kaufmnnisch-&gt;getChecklist()-&gt;attach($Kundenauftragliegtvor);
  </code></pre>
  
  <p>So basically when creating an object of that class i want to initially create the object $Kundenauftragliegtvor (of course later i want to add additional objects of that class, but thats another story)... BUT: When creating an object of the class Kaufmnnisch I get the following error:</p>
  
  <pre><code>Incorrect integer value: '' for column 'checklist' at row 1 
  </code></pre>
  
  <p>It seems that attaching the object to the objectstorage 'checklist' seems to create the error in my MySQL database. I suspect that my TCA (specifically the part for the objectstorage) isn't correct:</p>
  
  <pre><code> 'checklist' =&gt; [
              'exclude' =&gt; true,
              'label' =&gt; 'LLL:EXT:kundentermine/Resources/Private/Language/locallang_db.xlf:tx_kundentermine_domain_model_kaufmnnisch.checklist',
              'config' =&gt; [
                  'type' =&gt; 'passthrough',
                  'items' =&gt; [
                      '1' =&gt; [
                          '0' =&gt; 'LLL:EXT:lang/locallang_core.xlf:labels.enabled'
                      ]
                  ],
                  'default' =&gt; 0,
              ]
          ],
  </code></pre>
  
  <p>Edit: in my ext_tables.sql file the datatype for 'checklist' is:</p>
  
  <pre><code>checklist smallint(5) unsigned DEFAULT '0' NOT NULL,
  </code></pre>
  
  <p>I guess the error has something to do with this... But what datatype should i specify for an objectstorage?</p>