1 Reply Latest reply on Jun 25, 2009 7:41 AM by adamw

    Audit/history table entries are not what I expected

      If I save a brand new entity, the "create" row gets added to my audit/history table. That's as expected.

      If I save that same entity again, without modifying anything, an additional row for the "update" gets added to my audit/history table. That is unexpected.

      If I modify the entity and save it, an additional row for the "update" gets added to my audit/history table. That's as expected.

      If I delete the entity, no row is added to my audit/history table for the "delete". That is unexpected.


      Is anyone else seeing the two unexpected issues?

      I'm using Hibernate 3.5-SNAPSHOT (for now).

      Thanks,
      Jamie

        • 1. Re: Audit/history table entries are not what I expected
          adamw

          Hello,

          there is certainly something wrong :).

          For the deletion case, are you sure that you installed the post-delete event listener?

          For the update, there should of course be no row added if there are no changes. Are you 100% sure that some audited property didn't change? If so, maybe you could try debugging and setting a breakpoint in AuditEvenLister, in the postUpdate method, to see the new and old state, and where exactly it decides that something changed?

          Thanks,
          Adam