title: Select directly into hierarchical user type
body: <p>Is it possible to do a select directly into a hierarchical user type?</p>
  
  <p>Imagine a table structure like this:</p>
  
  <pre><code>PARENT
  ------
  ID
  NAME
  
  CHILD
  -----
  ID
  PARENT_ID
  NAME
  </code></pre>
  
  <p>Additionally, I have user types like this:</p>
  
  <pre><code>create or replace type child_item as object
  (
    ID NUMBER(10),
    NAME VARCHAR(255)
  );
  
  create or replace type children_table as table of child_item;
  
  create or replace type parent_item as object
  (
    ID NUMBER(10),
    NAME VARCHAR(255),
    CHILDREN CHILDREN_TABLE
  );
  
  create or replace type parent_table as table of parent_item;
  </code></pre>
  
  <p>And a statement like this:</p>
  
  <pre><code>select * from parent p inner join child c on p.id = c.parent_id;
  </code></pre>
  
  <p>Now, I want the result of that statement to be in an object of type <code>parent_table</code>. Is this somehow possible without the use of a complex <code>FOR</code> loop?</p>