title: How to select columns from nested table which points to object references
body: <p>I have type:</p>
  
  <pre><code>CREATE OR REPLACE TYPE something AS OBJECT(
     name VARCHAR2(100),
     nestedObjects objects
  );
  </code></pre>
  
  <p>where <strong>objects</strong> type is <strong>table of references</strong>:</p>
  
  <pre><code>CREATE TYPE objects IS TABLE OF REF object;
  </code></pre>
  
  <p>and <strong>object</strong> is:</p>
  
  <pre><code>CREATE OR REPLACE TYPE object AS OBJECT (
     number NUMBER
  );
  </code></pre>
  
  <p>then I create table:</p>
  
  <pre><code>CREATE TABLE tab_something OF something
     NESTED TABLE nestedObjects STORE AS tab_nestedObjects;
  </code></pre>
  
  <p>and I want select numbers from objects contained in something table, I try:</p>
  
  <pre><code>SELECT ts.name, cursor(
     select deref(object).number 
     from TABLE(ts.nestedObjects) object
  ) FROM tab_something ts;
  </code></pre>
  
  <p>or:</p>
  
  <pre><code>SELECT DEREF(object).number 
  FROM tab_something ts, TABLE(ts.nestedObjects) object;
  </code></pre>
  
  <p>but it doesn't work. Oracle say 'object' identifier does not valid.</p>
  
  <p>When nestedObjects consist of objects then it work well because there is no need to deal with references. but when it points to object references it does not work. Ho can I deal with it?</p>
  
  <p>THANKS FOR HELP!</p>