Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6220891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:02:19+00:00 2026-05-24T08:02:19+00:00

The docs says that ancestor will apply a filter of given ancestor being somewhere

  • 0

The docs says that ancestor will apply a filter of given ancestor being somewhere in the ancestry tree.

You can filter your datastore queries to a specified ancestor, so that results contain only entities containing that ancestor. In other words, all of the results will have the ancestor as their parent, or parent’s parent, or etc. Passing None as a parameter does not query for entities without ancestors and will return errors.

Can I somehow filter on one level, immediate ancestor relationship so that a query will provide models having specific parent? Or must I store parent relationship in a ReferenceProperty and filter on that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T08:02:20+00:00Added an answer on May 24, 2026 at 8:02 am

    You are right: querying for ancestor will get all parents, not only the direct one. To get the direct parent only, you must store it in a property (can be a ReferenceProperty or you can just store an encoded key in a StringProperty), then query for it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The Django documentation ( http://docs.djangoproject.com/en/1.3/topics/testing/#running-tests ) says that you can run individual test cases
I read http://download.oracle.com/javase/6/docs/technotes/tools/solaris/keytool.html It says that we can export a CSR file, but no
In the jqGrid option docs it says that you can set shrinkToFit to an
I saw this www.spec.org/cpu2006/Docs/481.wrf.html where it says that If your system requires 8-byte headers,
sometimes signals in django are triggered twice. In the docs it says that a
http://developers.facebook.com/docs/reference/api/post/ In Comments -> Create section it says: You can write to the POST_ID/comments
MSDN docs say that only value types need boxing, but this does not apply
In the Apple docs it says that JavaScript execution time is limited to 10
based on the docs for knockout.mapping.js it says that properties of a data object
I read http://code.google.com/speed/page-speed/docs/caching.html . It says that proxy servers may cache cookies. I need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.