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

I guess I already know the answer but may be there is a good
I guess, it is quite common task. There is a table A let's say
I guess its actually two questions : (1) My IDE generates a particular directory
I guess i have a simple question about better code organization. Say i have
Guess that I have a TextView that I want to update it in some
I guess that the difficult part is the source. Do you know any webpage
I guess getView() is called for each item of the list, but my question
I guess my general question which I googled to no luck: Is there a
I guess I'm a quick typer because if I type the characters ArrayList myArray;
I guess the problem is that I do not know how to use factory

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.