trigger « Interceptor « JPA Q&A

1. A trigger on hibernate (maybe this is called interceptor)

I have a module which uses Hibernate as an ORM solution with EHCache as second level cache. I have another seperate module which inserts and updates the database. What I need is to ...

2. hibernate interceptor or DB triggers? Which is best?

I am confused between using hibernate interceptor and DB triggers. Can somebody point out the pros and cons of both the ways?

3. onFlushDirty() in Interceptor not triggering consistently

Hibernate version:3.0.4 I've implemented Audit logging in hibernate using a combination of various examples i've found. I've noticed that the onFlushDirty() method is not triggered when an object with changes being persisted also contains related persistent objects. Ie, a user with associated roles. It will trigger fine if the user has no roles assigned but not if the user has roles ...