title: Getting "illegal access to loading collection" error
body: <p>When I execute my program without implementing <code>hashcode()</code> and <code>toString()</code> then it works fine. But as soon as I include <code>hashcode()</code> and <code>toString()</code> then I get this "illegal access to loading collection" error.</p>
  
  <p>My hbm files are </p>
  
  <p><strong>1) booking.hbm.xml</strong></p>
  
  <pre><code>&lt;many-to-one name="userId" class="User" column="user_id"
          insert="true" update="true" cascade="save-update" &gt;
      &lt;/many-to-one&gt;
      &lt;many-to-one name="flightId" class="FlightSchedule"
          column="flight_id" cascade="all" not-null="true"&gt;
      &lt;/many-to-one&gt;
  
      &lt;set name="passenger" table="passenger79215" lazy="false"
          inverse="true" cascade="save-update"&gt;
          &lt;key column="reference_id" /&gt;
          &lt;one-to-many class="Passenger" /&gt;
      &lt;/set&gt;
  </code></pre>
  
  <p><strong>2) Passenger.hbm.xml</strong></p>
  
  <pre><code>&lt;many-to-one name="referenceid" class="Booking" lazy="false"
          insert="true" update="true" column="reference_id "
          cascade="save-update"&gt;
      &lt;/many-to-one&gt;
  </code></pre>
  
  <p><strong>3) User.hbm.xml</strong></p>
  
  <pre><code>&lt;set name="booking" table="bookings79215" lazy="true"
          inverse="false" cascade="save-update"&gt;
          &lt;key column="user_id" /&gt;
          &lt;one-to-many class="Booking" /&gt;
      &lt;/set&gt;
  </code></pre>
  
  <p>Can anyone explain the error?</p>