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 236577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:21:22+00:00 2026-05-11T20:21:22+00:00

There is some discussion on my team about updating entity data and how best

  • 0

There is some discussion on my team about updating entity data and how best to approach it. This is a security framework and so here are some of the constraints and ideas.

  1. every table in DB has a PK that is a guid, this is required for our multi-node clustering solution. The idea is that we don’t want to expose this on an entity to a customer via an API because it could do two things,
    1. give them more info that needed for their job and giving hackers more information about the system.
    2. support nightmare is that a client hardcodes to this ID in some fashion and if we need to change our PK’s clients are impacted.

solutions are to expose the natual key of the items like Role object with a unique Name, and Realm, together guarentee uniqueness however updating either of these values is the challenge, cause you need to specify the old and new values to update, or pass two objects in original and new object, so we can find the one to update. kind of messy,

another approach is to make an alternate key and have this exposed to the client they can use it all they want and we don’t care cause it isn’t tied to our PK.

it seems everyone these days just uses PK as ID for entities with no issues, not sure how to convince our team of veterns from the old timey programming days.

Another issue is how to support partial updates, issue is that you have entity with 10 properties, 4 collections, etc… with a name+realm combo and specify what property to update instead of pulling down whole object change 1 field, send back for update. I say lazy load the collections, but not sure if partial update makes sense.

thoughts?

thanks!

  • 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-11T20:21:23+00:00Added an answer on May 11, 2026 at 8:21 pm

    My approach for a security framework would be like this:

    • Give anything in the database an internal ID (identity column, sequence, whatever your database support. “native generated id column” in Hibernate speak). Eventually, you’re going to need it and to retro-fit is a lot of work.

    • If you need to hand an ID to the user, generate a random number, check that it hasn’t been used already, connect it to an internal ID and then hand it to the user. Never hand out the internal ID and never use IDs that can be guessed by crackers.

    As for partial updates, they only start to make sense if you have lots of objects with lots of attributes. For 10 attributes, I would say “premature optimization.”

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

Sidebar

Related Questions

Working in a team, all using IntelliJ, there's some discussion about checking-in or not
During a discussion about security, a developer on my team asked if there was
I've seen there is some other discussion about this, however, none of the other
There has been some discussion on the SO community wiki about whether database objects
There's been a discussion between me and some colleagues that are taking the same
Is there some way when sending this message to specify that I rather have
There has been some discussion of the merits or demerits / evilness of using
I have see some discussion around this topic and concluded that it is not
This question has been the subject of some lively discussions in my team. My
I don't understand this at all. Here is some Javascript code that works in

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.