GQL query in google cloud console

173 views
Skip to first unread message

Happy Mornings

unread,
Nov 22, 2015, 4:35:11 AM11/22/15
to Google App Engine
I have entry in the Order table with the value (id=5629499534213120) in the Name/ID column.
I want to search for the Order entries using this field. I tried executing the following query, it is not giving any result.

SELECT * from Order where __key__ = KEY(Order, 5629499534213120)

I am getting the following error.

'SELECT * from Order where __key__ = KEY(Order, 5629499534213120) LIMIT 50': Encountered "Order" at line 1, column 15. Was expecting one of: <UNQUOTED_NAME> ... <QUOTED_NAME> ...

Can you please let me know the correct query.

Also, I need to find the child items (OrderItem) for the given order.

SELECT * FROM OrderItem WHERE __key__ HAS ANCESTOR KEY(Order, 5629499534213120)

for this query, i getting the error,
'SELECT * FROM OrderItem WHERE __key__ HAS ANCESTOR KEY(Order, 5629499534213120) LIMIT 50': Encountered "Order" at line 1, column 56. Was expecting one of: <UNQUOTED_NAME> ... <QUOTED_NAME> ...

please help.

Thanks

Reply all
Reply to author
Forward
0 new messages