title: Nested CachedSqlEntityProcessor running for each entity row with Solr 3.6?
body: <p>I just upgraded from Solr 3.4 to Solr 3.6; I'm using the same <code>data-import.xml</code> for both versions. The import functioned properly with 3.4.</p>
  
  <p>I'm using a nested entity to fetch authors associated with each document, and I'm using <code>CachedSqlEntityProcessor</code> to avoid hitting the DB an unreasonable number of times. However, when indexing, Solr indexes very slowly and appears to be fetching all authors in the DB for each document. The index should be ~500 megs; I aborted the indexing when it reached ~6gigs. If I comment out the nested <code>author</code> entity below, Solr will index normally. </p>
  
  <p>Am I missing something obvious or is this a bug?</p>
  
  <pre><code>&lt;document name="documents"&gt;
      &lt;entity name="document" dataSource="production"
       transformer="HTMLStripTransformer,TemplateTransformer,RegexTransformer"
       query="select id, ..., from document"&gt;
          &lt;field column="id" name="id"/&gt;
          &lt;field column="uid" name="uid" template="DOC${document.id}"/&gt;
          &lt;!-- more fields .. --&gt;
          &lt;entity name="author" dataSource="production"
           query="select 
                  cast(da.document_id as text) as document_id, 
                  a.id, a.name, a.signature from document_author da 
                  left outer join author a on a.id = da.author_id"
           cacheKey="document_id"
           cacheLookup="document.id" 
           processor="CachedSqlEntityProcessor"&gt;
               &lt;field name="author_id" column="id" /&gt;
               &lt;field name="author" column="name" /&gt;
               &lt;field name="author_signature" column="signature" /&gt;
          &lt;/entity&gt;
      &lt;/entity&gt;
  &lt;/document&gt;
  </code></pre>