title: in GAE what is the reason to use something other then Key for Id?
body: <p>I started to develop an app in google app engine as my third year project. I have not had much practice with databases nor with JPA.</p>
  
  <p>I was just wondering what is the reason to use something other then Key for Id.</p>
  
  <p>Anyway it is going to be in the database, why not to use it?</p>
  
  <p>We can declare an ID</p>
  
  <pre><code>@Id private Key id
  </code></pre>
  
  <p>or</p>
  
  <pre><code>@Id private long Id
  </code></pre>
  
  <p>etc.</p>
  
  <p>But Key is gonna be assigned to any Entity in GAE anyway so why bother assigning something else as an ID? </p>
  
  <p>There are other issues too, particularly with the relationships. For example if the Department has an Id which is Long, can the User (Department's child) also have an Id which is Long?</p>
  
  <p>NO. Why?</p>
  
  <p>The datastore has to store a reference of the parent-child relationship in the child. Hence it needs to have a field which is an Id in the child where it can store the Long value of the parent.</p>
  
  <p>May be what I am asking is what are the traditional reasons of why someone would uses String, long, etc. And why you still want to have Id as long or string even in presence of key class</p>