title: FETCHing from Custom Cursor to Collection
body: <p>This feels like it should be a simple thing, but I can't seem to get this to work correctly. I have an existing procedure (<code>HDT_CORE_GETDATA_LSR_V31</code>) that returns a custom cursor built with the following code:</p>
  
  <pre><code>TYPE CORE_REC IS RECORD 
        (
             OrgID CHAR(20 BYTE)
             , DistrictCode VARCHAR2(200 BYTE)
             --52 other fields
             , ReqSource VARCHAR2 (1020 BYTE)
        );
  
   TYPE CORE_REC_CURSOR IS REF CURSOR RETURN CORE_REC;
  </code></pre>
  
  <p>I'm trying to build a new function that will call this procedure and <code>INSERT</code> the result into a table.</p>
  
  <p>I built the new procedure with variable, <code>RecordLoad</code>, that is a collection based on the type:</p>
  
  <pre><code>create or replace TYPE HDT_CORE_REC_V31 FORCE AS OBJECT 
        (
             OrgID CHAR(20 BYTE)
             , DistrictCode VARCHAR2(200 BYTE)
              -- Same 52 other fields; meticulously matched to be exact
             , ReqSource VARCHAR2 (1020 BYTE)
        );
  
  create or replace TYPE HDT_CORE_REC_TABLE_V31 IS TABLE OF HDT_CORE_REC_V31;
  </code></pre>
  
  <p>Inside the new proc, I built two variables:</p>
  
  <pre><code>    LSRData HDT_CORE_MAIN_V31.CORE_REC_CURSOR;
      RecordLoad SABASC02.HDT_CORE_REC_TABLE_V31 :=   
        SABASC02.HDT_CORE_REC_TABLE_V31();
  </code></pre>
  
  <p>Then I tried the following:</p>
  
  <pre><code>  BEGIN
  
    SABASC02.HDT_CORE_GETDATA_LSR_V31(LSRData, NULL, ParamOrgCode,'d', NULL,
      NULL, NULL, NULL, NULL);
  
  LOOP
    FETCH LSRData BULK COLLECT INTO RecordLoad;
    EXIT WHEN RecordLoad.COUNT = 0;
  
    FOR indx IN RecordLoad.FIRST .. RecordLoad.LAST
    LOOP
      DBMS_OUTPUT.PUT_LINE('AssociateID = ' || RecordLoad(indx).AssociateID);
    END LOOP;
  END LOOP;
  </code></pre>
  
  <p>But, this line of code: <code>FETCH LSRData BULK COLLECT INTO RecordLoad;</code> throws the error <code>PLS-00386: type mismatch found at 'RECORDLOAD' between 'FETCH' cursor and 'INTO' variables.</code></p>
  
  <p>Clearly there's a mismatch here, but I'm not sure how to resolve. I've checked and double checked that all the fields between the two constructors match exactly in name, order, and datatype. </p>
  
  <p>What am I missing?</p>