title: How to configure extbase to fetch inline / IRRE relations to tt_content?
body: <p>I've built a extension where I can assign content elements (tt_content) inline (IRRE) to my entries in the TYPO3 Backend.
  But I can't figure out how I can resolve the relations so that I can display the assigned content elements in the frontend.</p>
  <p>I've created the extension with the 'Extension Builder' in TYPO3 9.5.5.
  I created a Model Object 'Content' and selected 'Map to existing table' in the 'Domain object settings' and choosed 'tt_content'.
  In my model 'ProductTab' I configured a 1:n relation of type 'Inline (IRRE)' with the name 'content' to my 'Content' model.</p>
  <p>If I add content elements to my model entries in the Backend, it works like expected. The relational fields in the DB are mapped correctly. With the 'Extbase Variable Dump' I can see that all my relations are passed to the front end plugin, but my 'content' relation is an empty 'ObjectStorage'.</p>
  <p>What am I missing so that the extbase persistence fetches my content relations?</p>
  <h1>ext_tables.sql excerpts</h1>
  <pre class="lang-sql prettyprint-override"><code>CREATE TABLE tx_myext_domain_model_producttab (
      product int(11) unsigned DEFAULT '0' NOT NULL,
      title varchar(255) DEFAULT '' NOT NULL,
      content int(11) unsigned DEFAULT '0' NOT NULL,
  
  );
  </code></pre>
  <pre class="lang-sql prettyprint-override"><code>CREATE TABLE tt_content (
      producttab int(11) unsigned DEFAULT '0' NOT NULL,
  );
  </code></pre>
  <h1>TCA excerpts</h1>
  <pre class="lang-php prettyprint-override"><code>        'content' =&gt; [
              'exclude' =&gt; false,
              'label' =&gt; 'producttab.content',
              'config' =&gt; [
                  'type' =&gt; 'inline',
                  'foreign_table' =&gt; 'tt_content',
                  'foreign_field' =&gt; 'producttab',
                  'maxitems' =&gt; 9999,
                  'appearance' =&gt; [
                      'collapseAll' =&gt; 0,
                      'levelLinksPosition' =&gt; 'top',
                      'showSynchronizationLink' =&gt; 1,
                      'showPossibleLocalizationRecords' =&gt; 1,
                      'showAllLocalizationLink' =&gt; 1
                  ],
              ],
  
          ],
  </code></pre>
  <p>Since I can add and edit the content elements in the Backend, I think the DB and TCA relation is fine.
  But something is still missing, so that the relation is fetched and provided to the FE template so that I can display the assigned content elements with a ViewHelper.</p>
  <h1>ProductTab.php excerpts</h1>
  <pre class="lang-php prettyprint-override"><code>class ProductTab extends \TYPO3\CMS\Extbase\DomainObject\AbstractValueObject
  {
      protected $content = null;
      
      protected function initStorageObjects()
      {
          $this-&gt;content = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
      }
  
      public function addContent(\MyExt\Domain\Model\Content $content)
      {
          $this-&gt;content-&gt;attach($content);
      }
  
      public function removeContent(\MyExt\Domain\Model\Content $contentToRemove)
      {
          $this-&gt;content-&gt;detach($contentToRemove);
      }
  
      public function getContent()
      {
          return $this-&gt;content;
      }
  
      public function setContent(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $content)
      {
          $this-&gt;content = $content;
      }
  }
  </code></pre>
  <h1>Extbase Variable Dump</h1>
  <p><a href="https://i.stack.imgur.com/0xZOX.png" rel="nofollow noreferrer">Screenshot of debug output</a></p>
  <p>On the screenshot you can see the fetched products (one item in this case) and the producttabs (also 1 item). There is one content element assigned, but the property content of the ProductTab with uid=1 is empty.</p>
  <h1>Update</h1>
  <p>Since I'm still not able to solve this issue, I've created a minimalistic extension with the <code>Extension Builder</code> to demonstrate the issue: <a href="https://github.com/apiening/demo_irrecontent" rel="nofollow noreferrer">https://github.com/apiening/demo_irrecontent</a></p>
  <p>The extension is the most simple one I could create with one model holding only one property and the relation to <code>tt_content</code>. It has a plugin <code>list</code> which also shows the debug output.
  I've put some more details in the <code>README.md</code>of the GitHub project.</p>