-
Notifications
You must be signed in to change notification settings - Fork 647
Description
Environment details
- OS: Ubuntu 16.04
- Node.js version: v7.8.0
- npm version: yarn 0.23.4
- google-cloud-node version: @google-cloud/datastore 1.03
Steps to reproduce
Preparation:
Create an entity, or some more, with kind "Order" and some well-defined properties.
Create an index with a selection of the existing properties for doing a projection query.
a)
Run a projection query on the selected properties for the kind "Order".
The result will be empty, with no error message, although entities with the selected properties do exist and the index is set up correctly.
Full (i.e. non-projection) queries and keys-only queries, on the other hand, work as expected.
For the very same setup, with just a different kind name, everything works fine.
b)
Try to run a GQL query like SELECT property1, property2 from Order, or even just SELECT * FROM Order through the Cloud Console.
An error message appears (German version here):
GQL-Abfragefehler: Encountered "Order" at line 1, column 89. Was expecting one of: <UNQUOTED_NAME>, <QUOTED_NAME>
Same result when putting "Order" into quotes, writing in all-caps or no-caps... whereas the very same setup with just a different kind name (like "Customer" instead of "Order") works without problems.
Conclusions/conjectures:
It seems "Order" is a reserved word in GQL and can therefore not be used as a kind name in GQL queries, whether in quotes or without quotes.
Maybe that is also the cause for the empty results for projection queries for kind "Order" through google-cloud-node, because it is internally translated into GQL or something?
I don't know where to file this issue concerning GQL, as my main concern is Node.js and that's what I am working with and where the issue came up. As for the other client libraries, I have not tested them, but I suspect it may turn up in any of the other language libraries as well.
This is not obvious at all. In the documentation I have only read about kind and property names preceded by two underscores being reserved. I don't think this is expected behaviour, is it?