title: how to avoid getting javassist lazy Entity proxy instances in Hibernate
body: <p>What do I have to change to avoid Hibernate giving me lazy javassist instance proxies rather than the true entity?</p>
  
  <p>UPDATE: I am using Spring 3.x and Hibernate 4.x</p>
  
  <p>The API I am using to load the entity is <code>org.hibernate.internal.SessionImpl#load(Person.class, Id)</code> and the mapping simply:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;!DOCTYPE hibernate-mapping PUBLIC
      "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
      "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"&gt;
  
  &lt;hibernate-mapping package="org.perfectjpattern.example.model"&gt;
  &lt;class name="Person" table="PERSON_" &gt;
      &lt;id name="id"&gt;
          &lt;generator class="native"&gt;&lt;/generator&gt;
      &lt;/id&gt;
      &lt;property name="name" update="false" /&gt;
      &lt;property name="age" update="true" /&gt;
  &lt;/class&gt;
  
  &lt;query name="Person.findByName"&gt;
      &lt;![CDATA[select p from Person p where p.name = ? ]]&gt;
  &lt;/query&gt;
  
  &lt;query name="Person.findByAge"&gt;
      &lt;![CDATA[select p from Person p where p.age = :Age ]]&gt;
  &lt;/query&gt;
  &lt;/hibernate-mapping&gt;
  </code></pre>