title: Hibernate disable collection fetching
body: <p>Using latest Hibernate 3...</p>
  
  <p>Have a model where Element class has 2 list collections against a Relation class.  The one being where Element owns (sources) the Relation and the other when it is the destination.</p>
  
  <pre><code> &lt;class name="Element"....&gt;
       ....
  
       &lt;list name="sourceRelations" ....&gt;
         ...
         &lt;one-to-many class="...Relation" /&gt;
       &lt;/list&gt;
  
       &lt;list name="destinationRelations" ....&gt;
         ...
         &lt;one-to-many class="...Relation" /&gt;
       &lt;/list&gt;
   &lt;/class&gt;
  
   &lt;class name="Relation"....&gt;
       ....
       &lt;many-to-one name="source" class="...Element" ...
          &lt;column name="SOURCEID" sql-type="INTEGER" not-null="true" /&gt;
       &lt;/many-to-one&gt;
       &lt;many-to-one name="destination" class="...Element" ...
          &lt;column name="DESTINATIONID" sql-type="INTEGER" not-null="true" /&gt;
       &lt;/many-to-one&gt;
   &lt;/class&gt;
  </code></pre>
  
  <p>The mapping is essentially only useful when generating Criteria queries.  Otherwise when fetching an Element (only through a criteria, never via get/load) I never want Hibernate to actually fetch the Relation collections.  Never.  Right now in my code I clean the Element objects before returning them by creating a new Element and transferring over the properties I want propagated (i.e. sourceRelation/destinationRelation never get transferred).  Same goes for criteria queries against Relation objects.  The source/destination properties (i.e. Element) are cleaned.</p>
  
  <p>Is there a way to proxy the Element entity via Hibernate interceptors or using Tuplizers to basically force all Element entities to null out the sourceRelation/destinationRelation properties?</p>