Skip to content

Is datastore.createQuery.hasAncestor() just work alone without any other query command like order sort or select? #803

Description

@petersunquest

Hi,

I use the gcloud@0.18.0 & nodejs 0.12.7.
And use datastore.createQuery get some result.
Every looks great when I do a query with filter + sort + select + limit + order same time.
But I got Error 412 'Precondition Failed' when I add a hasAncestor() for any filter + sort + select + limit. Even I change order for each one when createQuery.
I used hasAncestor() whthout other filter or sort was work fine.
Is the hasAncestor() can only alone, can't use other command as sort or select or filter same time?
Or that is a bug?
I did:
var q = ds.createQuery('table')
.hasAncestor(ds.key({path:['fatherTable','fatherName']}))
.select('time')
.order('-time')
.limit(5)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: datastoreIssues related to the Datastore API.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions