title: Can ndb.KeyProperty reference a base model class when using model inheritance?
body: <p>
  I have some models that share a common set of properties, which I have defined in a base model class from which other models inherit:</p>
  
  <pre class="lang-python prettyprint-override"><code>class BaseUser(ndb.Model):
      name = ndb.StringProperty()
  
  class DerivedUserA(BaseUser):
      # some additional properties...
  
  class DerivedUserB(BaseUser):
      # some additional properties...
  </code></pre>
  
  <p>In some other model, I need a reference to any <code>BaseUser</code>-derived model:</p>
  
  <pre class="lang-python prettyprint-override"><code>class MainModel(ndb.Model):
      user = ndb.KeyProperty(kind = BaseUser)
  </code></pre>
  
  <p>However, When I try to set a <code>DerivedUserA</code> entity key to the <code>MainModel.user</code> property, GAE raises a <code>BadValueError</code> stating that it is expecting a key with kind <code>BaseUser</code> but was given a <code>DerivedUserA</code>.</p>
  
  <p>If I remove the <code>kind</code> argument from my <code>MainModel</code>, it works:</p>
  
  <pre class="lang-python prettyprint-override"><code>class MainModel(ndb.Model):
      user = ndb.KeyProperty()
  </code></pre>
  
  <p>I could live with that, but I'd rather have a check in place to make sure that I am not trying to save any kind of entity in the <code>MainModel.user</code> property. Is there a way to do that?</p>