title: Compass & Hibernate: prevent inflation of proxy objects during indexing
body: <p>I am trying to prevent my compass (2.2) indexing from inflating lazy hibernate references.</p>
  
  <p>I know there is a setting for this</p>
  
  <pre><code>compass.marshalling.hibernate.initializeProxy
  </code></pre>
  
  <p>But after a lot of debugging the compass sources I found out, that this setting is not even passed to <code>HibernateProxyExtractor</code>.</p>
  
  <p>I am applying the setting in my XML config as follows, is this correct?</p>
  
  <pre><code>&lt;bean id="compass" class="org.compass.spring.LocalCompassBean"&gt;
      &lt;!-- .... --&gt;
      &lt;property name="compassSettings"&gt;
          &lt;prop key="compass.marshalling.hibernate.initializeProxy"&gt;false&lt;/prop&gt;
          &lt;!-- ... --&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>While debugging, I found out that <code>DefaultConverterLookup</code> creates and configures <code>ClassMappingConverter</code> (which in turn configures <code>ProyExtractorHelper</code> which in turn configures <code>HibernateProxyExtractor</code>). However, configuration settings are only passed to <code>ClassMappingConverter</code>, if they are prefixed with "<code>compass.converter</code>" (<code>CompassEnvironment.Converter.PREFIX</code>), which is not the case for <code>compass.marshalling.hibernate.initializeProxy</code></p>
  
  <p>Note: I am not at all a Compass/Lucene expert, so maybe I just do not get how to configure this correctly.</p>