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

The Archive Base Latest Questions

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

I have a datastore object that uses one of the fields in the class

  • 0

I have a datastore object that uses one of the fields in the class to create the key. Suppose I have an object ‘a’ with a value ‘k’ for this field. If I try to add an object ‘b’ to the datastore, which also has value ‘k’ for the field, object ‘b’ overwrites object ‘a’. Just wanted to confirm if this is expected behaviour. While it looks quite obvious, it would be great if someone can explain the underlying concept..

  • 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:58:54+00:00Added an answer on May 13, 2026 at 9:58 am

    As Adam has explained, the short answer is that two entities can’t share the same key (imagine a dict). The long answer though, is a little bit more complex. See the docs:

    Paths and Key Uniqueness

    The complete key of an entity,
    including the path, the kind and the
    name or numeric ID, is unique and
    specific to that entity. The complete
    key is assigned when the entity is
    created in the datastore, and none of
    its parts can change.

    The keys of two different entities can
    have similar parts as long as at least
    one part is different. For instance,
    two entities can have the same kind
    and name if they have different
    parents. Similarly, two entities can
    have the same parent (or no parent)
    and name if they are of different
    kinds
    .

    An application should not rely on
    numeric IDs being assigned in
    increasing order with the order of
    entity creation. This is generally the
    case, but not guaranteed.

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

Sidebar

Related Questions

I have a core data application that uses an NSPredicate in one of its
If I have a line like this ContentRepository.Update(existing); that goes into datastore repository to
Suppose we have a JDO entity that uses an unencoded string as the PrimaryKey
I have the following issue: A java object contains two arrays of core datastore
I have a datastore model representing items in an ecommerce site: class Item(db.Model): CSIN
I have created a multi column datastore on a table that allows me to
I have an iphone app that uses Core Data to do storage. I have
I have some code that roughly does this inside of a GAE worker task:
Imagine I have this object (written with Ruby literals) stored in a MongoDB: {tags
I have a couple of app engine urls that return pure JSON and this

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.