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

  • Home
  • SEARCH
  • 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 7737587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:02:39+00:00 2026-06-01T08:02:39+00:00

I’ve got a system where all changes to business objects have to be audited.

  • 0

I’ve got a system where all changes to business objects have to be audited. So an entity MyEntity has a Number property, and when you change this field, the system leaves the original record alone, and makes another record with the new number value, and marks the original record archived. Number is not the primary key. There’s also a Version field to track each version of the entity, and an Id field to track object identity across multiple versions. So far so good.

If you delete the entity, the system doesn’t delete the record, but just marks it as deleted. So far so good.

Here’s the problem. Now the client has a bunch of entities in a list, and there can be gaps:

Item 1
Item 2
Item 3
Item 5
Item 6
...
Item 10

They want to be able to do two new things:

  1. Insert an item with number 5, and shift all the subsequent items up a number (5 –> 6, 6–> 7 etc)
  2. Collapse gaps in the items, e.g., renumber 5 –> 4, and shift all subsequent items down a number.

This seems really nasty to me, because normally any change to a number would need to be audited, so I can’t just change all the numbers in bulk like that. (And it’s even more complex still, because each change needs to be approved by a supervisor, and changes can be restored to a previous audit state.)

Even worse, item 4 might exist, but be missing because it’s in an archived state. If you want to collapse subsequent items, what should happen to the existing archived item? I can’t see a reasonable way to handle these situations while auditing them, and allowing for approvals and restore. Anyone know how to handle this?

  • 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-06-01T08:02:40+00:00Added an answer on June 1, 2026 at 8:02 am

    I never really solved this problem in a fully satisfying way, but we handled this by implementing a special mode, available only to the super admin, where auditing is disabled for this kind of identity changing operation, on the grounds that the Number, while not a primary key, is an essential user key, and if you change it, you’re changing the object identity to a new thing, which starts with a clean slate. Not ideal, but a reasonable compromise.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a jquery bug and I've been looking for hours now, I can't
Basically, what I'm trying to create is a page of div tags, each has

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.