title: How to use ndb key with integer_id?
body: <p>I see the document
  <a href="https://developers.google.com/appengine/docs/python/ndb/keyclass#Key_integer_id" rel="nofollow">https://developers.google.com/appengine/docs/python/ndb/keyclass#Key_integer_id</a></p>
  
  <blockquote>
    <p>Returns the integer id in the last (kind, id) pair, or None if the key
    has an string id or is incomplete.</p>
  </blockquote>
  
  <p>see I think the id of a key can be a int  ; so I write</p>
  
  <pre><code>    r = ndb.Key(UserSession, int(id)).get()
      if r:
          return r.session
  </code></pre>
  
  <p>but the dev_server.py , will always raise</p>
  
  <pre><code>  File "/home/bitcoin/down/google_appengine/google/appengine/datastore/datastore_stub_util.py", line 346, in CheckReference
      raise datastore_errors.BadRequestError('missing key id/name')
  BadRequestError: missing key id/name
  </code></pre>
  
  <p>I chanage the int(id) -> str(id)</p>
  
  <p>seems right ;</p>
  
  <p>so my question is , How to use ndb key with integer_id ?</p>
  
  <p>the model is </p>
  
  <pre><code>class UserSession(ndb.Model):
      session = ndb.BlobProperty()
  </code></pre>