title: Solr Dataimport nested entity from PostgreSQL
body: <p>I wanna create nested entity with <code>DataImportHandler</code>.<br />
  I use Solr 8.6, Postgress 12, openjdk-11.</p>
  <p>My config (<code>schema.xml</code>) looks like this:</p>
  <pre><code>&lt;schema name=&quot;products&quot; version=&quot;1.5&quot;&gt;
  
      &lt;field name=&quot;_version_&quot; type=&quot;long&quot; indexed=&quot;true&quot; stored=&quot;true&quot;/&gt;
      &lt;field name=&quot;_root_&quot; type=&quot;int&quot; indexed=&quot;true&quot; stored=&quot;false&quot;/&gt;
  
      &lt;uniqueKey&gt;id&lt;/uniqueKey&gt;
  
      &lt;field name=&quot;id&quot; type=&quot;int&quot; indexed=&quot;true&quot; stored=&quot;true&quot; required=&quot;true&quot; multiValued=&quot;false&quot;/&gt;
      &lt;field name=&quot;price&quot; type=&quot;float&quot; indexed=&quot;true&quot; required=&quot;true&quot; stored=&quot;true&quot;/&gt;
      &lt;field name=&quot;categories&quot; type=&quot;int&quot; indexed=&quot;false&quot; stored=&quot;true&quot; required=&quot;true&quot; multiValued=&quot;true&quot;/&gt;
  
      &lt;field name=&quot;pictures&quot; type=&quot;string&quot; indexed=&quot;true&quot; stored=&quot;true&quot; multiValued=&quot;true&quot;/&gt;
      &lt;field name=&quot;pid&quot; type=&quot;int&quot; indexed=&quot;true&quot; stored=&quot;true&quot; /&gt;
      &lt;field name=&quot;previewUrl &quot; type=&quot;string&quot; indexed=&quot;true&quot; stored=&quot;true&quot; /&gt;
  &lt;/schema&gt;
  </code></pre>
  <p>data-config.xml</p>
  <pre><code>&lt;dataConfig&gt;
      &lt;dataSource type=&quot;JdbcDataSource&quot;
              driver=&quot;org.postgresql.Driver&quot;
              url=&quot;jdbc:postgresql://${db.host}/myDB&quot;
              user=&quot;user&quot;
              password=&quot;myPassword&quot;
      /&gt;
  
      &lt;document&gt;
          &lt;entity name=&quot;products&quot;
              pk=&quot;id&quot;
              transformer=&quot;DateFormatTransformer&quot;
              query=&quot;SELECT * from products&quot;
              deltaQuery=&quot;SELECT id FROM products WHERE updated &gt; '${dataimporter.last_index_time}'::timestamp&quot;
              deltaImportQuery=&quot;SELECT * FROM products WHERE id=${dataimporter.delta.id}&quot;
          /&gt;
  
              &lt;field column=&quot;id&quot; name=&quot;id&quot;/&gt;
              &lt;field column=&quot;price&quot; name=&quot;price&quot;/&gt;
  
              &lt;entity name=&quot;categories&quot;
                  query=&quot;SELECT category_id FROM product_category WHERE product_id='${products.id}'&quot;&gt;
                  &lt;field column=&quot;category_id&quot; name=&quot;categories&quot;/&gt;
              &lt;/entity&gt;
  
              &lt;entity name=&quot;pictures&quot;
                  child=&quot;true&quot;
                  pk=&quot;pid&quot;
                  query=&quot;SELECT * FROM pictures WHERE product_id='${products.id}'&quot;
              &gt;
                  &lt;field column=&quot;id&quot; name=&quot;pid&quot;/&gt;
                  &lt;field column=&quot;preview_url&quot; name=&quot;previewUrl&quot;/&gt;
              &lt;/entity&gt;
          &lt;/entity&gt;
      &lt;/document&gt;
  &lt;/dataConfig&gt;
  </code></pre>
  <p>This is the result I expect:</p>
  <pre><code>[
    {
      &quot;id&quot;:1,
      &quot;price&quot;: 10,
      &quot;categories&quot;: [1, 2]
      &quot;pictures&quot;: [
          {
             &quot;pid&quot;:1,
             &quot;previewUrl&quot;:&quot;/url&quot;
          },
          {
             &quot;pid&quot;:2,
             &quot;previewUrl&quot;:&quot;/url&quot;
          },
       ]
      &quot;_version_&quot;:1674819829308063744
    }
  ]
  </code></pre>
  <p>But I get the following error:</p>
  <pre><code>org.apache.solr.common.SolrException: [doc=null] missing required field: price
  </code></pre>
  <p>What am I doing wrong?</p>