I have a one to many association from Eventtype to Event, relationship mapped (using Middlegen) as follows:
From Eventtype to Event
Code:
<!-- bi-directional one-to-many association to Event -->
<set
name="events"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="eventtypeid" />
</key>
<one-to-many
class="com.hibernate.Event"
/>
</set>
From Event to Eventtype
Code:
<many-to-one
name="eventtype"
class="com.hibernate.Eventtype"
not-null="true"
>
<column name="eventtypeid"/>
</many-to-one>
I'm retrieving the eventtypes with a simple find():
List eventtypes = session.find("from Eventtype as eventtype");
When I run this I get a huge tree of objects and sub-objects. Do I have some problem with the mapping? Is there some application-level config setting that overrides my lazy loading setting in the hbm?