We need to perform some logic whenever a certain entity, Foo, gets loaded. Foo has a property Bar. We've created a LoadEventListener and have configured it with the config below. The listener's onLoad function is not being called whenever a Foo is loaded via a HQL query. The listener's onLoad event is being called whenever a Bar is loaded to hydrate the Foo, so the listener is registered properly.
Should the LoadEventListener be triggered when an entity is loaded via an HQL query? The PostLoadEventListener is triggered, so I assume a LoadEventListener should as well? We're using hibernate-core 3.3.1.GA if it matters.
Code:
<event type="load">
<listener class="com.backstopsolutions.security.PermissionedResourceLoadEventListener"/>
</event>