google-app-enginegqlgqlqueryobjectify

Working with columns having dot(.) in their name using GQL


I use Objectify for datastore operations in my GAE/Java application. I have used Objectify's @Embeded facility in a couple of places in my project. Objectify automatically flattens the nested objects within the entity marked by @Embeded notation using the . separator. Thus I have ended up with column names like entity.embededObject.Field

For example I have an entity 'Person' in my data store with two columns name and address.email.

I want to filter through Person in the datastore viewer by writing a simple GQL query. But the following query fails with a syntax error:

SELECT * FROM Person where address.email='mail@gmail.com'

whereas the following works as it should

SELECT * FROM Person where name='Joe'

What am I doing wrong?


Solution

  • GQL currently doesn't support this - only 'word' characters are supported. You should definitely file this as a bug in the issue tracker.