Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 529243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:04:17+00:00 2026-05-13T09:04:17+00:00

I guess it’s a good practice to capture auditable fields to track what happened

  • 0

I guess it’s a good practice to capture auditable fields to track what happened to a particular entity (say createdBy, creationDate, modifiedBy, modifiedDate)

  1. I am assuming if an object is never modified it makes sense just to capture the following auditable fields for an SNMPv3 event (say createdBy, creationDate)

  2. I am assuming if an object is modifiable post creation by multiple people, example a User profile can be modified by self or admin then it would make sense to capture all the above attributes (say createdBy, creationDate, modifiedBy, modifiedDate)

  3. Assuming a history of audit trail per entity is not required, would it make sense to store all auditable attributes in the entity itself

  4. Would it make sense to delegate auditing to a 3rd party framework (say JBoss Envers – http://www.jboss.org/envers) for the above use cases.

  5. Assuming an entity (say a Purchase Order) is created and maintained by User X, and User Y makes some refinements to the above PO. Who should be marked as the owner of this entity (is it the creator or the modifier). creationDate in this case might not be of any relevance at all, so would it make sense to track this field here.

Note: The underlying persistence layer is based on JPA, Hibernate 3.3.x

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T09:04:17+00:00Added an answer on May 13, 2026 at 9:04 am

    (1) and (2) seem reasonable although it probably wouldn’t hurt to treat all entities the same rather than complicate it with create-only and create/modify entities.

    (3) Storing them on the entity is the simplest, but I would be tempted to have a single table or table per entity just for the audit data. That would give you flexibility in case you wanted to store multiple modifications, i.e. the full history. And possibly a slight performance improvement when querying the main entity.

    (4) Envers looks interesting and easy, but it seems to store a full history and you indicated that wasn’t necessary so it might be overkill.

    (5) I’d say the creator is always the person (or process) that caused the initial insert and modifier is the last person/process that caused an update. If you want to make business decisions about the owner, treat that as separate field rather than as part of your auditing solution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My guess is that class variables (class var) are truly global in storage (that
I guess this is an odd one, and the answer is most likely it
I guess the real question is: If I don't care about dirty reads, will
I guess I'll illustrate with an example: In this game you are able to
I guess I'm really after an aid to help people who forget, Cruise Control
I guess it should be a common technique, However, I tried the following two
I guess, the following is a standard problem on every school or university: It
I guess the topic says it. I have tried googling this, but havent gotten
I guess I have been using the Web Site model ever since .NET 2.0
I'm going to guess that the answer is no based on the below error

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.