title: How to delete all entities connected to a entity connected through Key property in appengine
body: <p>I have following data store model.</p>
  
  <pre><code>class UserDetail(ndb.Model):
      name=ndb.StringProperty(required=True)
      password=ndb.StringProperty(required=True)
      email=ndb.StringProperty(required=False)
      posts=ndb.KeyProperty(kind='Post',repeated=True)
  
  class Post(ndb.Model):
      subject=ndb.StringProperty(required=True)
      content=ndb.TextProperty(required=True)
      created=ndb.DateTimeProperty(auto_now_add=True)
      user=ndb.KeyProperty(kind='UserDetail')
      comments=ndb.KeyProperty(kind='Comment',repeated=True)
  
  class Comment(ndb.Model):
      body=ndb.StringProperty(required=True)
      user=ndb.KeyProperty(kind='UserDetail')
      post=ndb.KeyProperty(kind='Post')
  </code></pre>
  
  <p>Basically what i want to do is to delete a post.And when i delete the post its all comments should get deleted and the post should also get deleted from User's post list from UserDetail model.The way i know to delete is to delete the post and the search the comment model with given post id and delete all of them and same way go to the user's posts list and delete the required post.
  Is there any better way to do it.</p>