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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:20:50+00:00 2026-05-24T18:20:50+00:00

When migrating the app from M/S datastore to HRD there are certain pitfalls to

  • 0

When migrating the app from M/S datastore to HRD there are certain pitfalls to avoid. I had a question on one such specific area where it says “Entity ids of the same Kind are not always unique”.

To explain it further here’s an example.

  1. Lets say I have 3 entities Customer, Contact, Address as below
  2. Contact entity references Customer using customer key as
    com.google.appengine.api.datastore.Key
  3. Address entity references Customer using customer key as Long

The 3 classes are:

public class Customer {
  @PrimaryKey
  @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  private Key id;

  @Persistent
  private String name;
}

public class Contact {
  @PrimaryKey
  @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  private Key id;

  @Persistent
  private String name;

  @Persistent
  private Key customerId;
}


public class Address {
  @PrimaryKey
  @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  private Key id;

  @Persistent
  private String address;

  @Persistent
  private Long customerId;
}

All the entities are root entities.

Now when we migrate what will happen to customerId in Contact and Address entities? Will they still work or do we need to do anything special with them before migration?

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-24T18:20:50+00:00Added an answer on May 24, 2026 at 6:20 pm

    What you are referring to is to do with how keys are built. An entity’s key will be made up from:

    • Your application id
    • The current namespace
    • The hierarchy of parent(s) <-- this allows ids to be non-unique within a kind
    • The Kind name
    • The given key_name OR id

    So for a key to be unique, any one of those parts could change. Within a single kind, within a single namespace within your app, the only time ids may not be unique is when you have set a parentfor that entity.

    This means all your root entities as defined, will have unique ids/names.

    If you need to guarantee that assigned ids are unique within a kind even across entities with an ancestor hierarchy, you could;

    1. Re-think your design. If you are referring to entities by id accross entity groups without needing/having the parent, you might have applied entity groups somewhere they were not needed
    2. You could allocateIds manually based on the root version of the Kind
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm migrating my app from the cell-based NSOutlineView to the view-based one. I'm mostly
We've got a weird problem while migrating our app from 1.3.7 to 2.0.0. Our
So, we are migrating an old web app from a 32-bit server to a
is there any documentation on changes that i might hit when migrating an app
I am thinking of migrating my GWT app from native GWT to GXT, however
I'm migrating a web app from an IIS 6 server to an IIS 7
I'm currently migrating a working app from CakePHP 1.2 to 1.3. Most things seem
I am in progress of migrating an app from CakePHP 1.3 to 2.0, and
I'm migrating a Google App Engine application from Django 0.96 to 1.2 . In
I have an app that I am migrating from Ruby to JRuby (due to

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.