I have _Hibernate in Action_ (the 2.x version) and the example there is for a separate table, not the same table as the entity. I'll search the wiki.
But actually in thinking about it some more, audit info in the same table doesn't make sense now to me anyway. You'd only be able to store the latest update info, losing the audit trail itself, and you wouldn't be able to retain audit info for deleted records....so perhaps that is why I didn't see an example of it earlier. It seems that storing info in a separate audit table is the way to go.
Thanks.
|