title: How to use NDB's id property?
body: <p>With old datastore I've used keys. Now I have to use ids (taken from <a href="https://docs.google.com/document/d/1qGgoBlSvd3sUxz2PgWJVeEHBRPzsLh-haHConITDHZU/edit" rel="nofollow">NDB Cheat Sheet doc</a>):</p>
  
  <pre><code>user = User.get_by_id(user_id)
  if user is None:
      user = User(id=user_id)
  </code></pre>
  
  <p>But looks like this code doesn't work - the record is added several times.</p>
  
  <p>(user_id is String in my case)</p>