Hi
I defined two listener, one for encryping data befor it is saved in the DB, and one for decrypting the data after it is loaded from the DB:
Code:
<event type="post-load">
<listener class="ch.hibernateplugin.EncryptionLoadListener"/>
<listener class="org.hibernate.event.def.DefaultPostLoadEventListener"/>
</event>
<event type="save-update">
<listener class="ch.hibernateplugin.EncryptionSaveOrUpdateListener"/>
<listener class="org.hibernate.event.def.DefaultSaveOrUpdateEventListener"/>
</event>
Are these the correct Listeners, or should I use a PreInsertEventListener? The DefaultPostLoadEventListener works perfectly, but the save-update event type only works when I call session.refresh().
Greets