{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/1485","repository_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/1485/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/1485/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/1485/events","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-java/issues/1485","id":196727664,"number":1485,"title":"Binding a FullEntity to a GqlQuery fails","user":{"login":"sai-pullabhotla","id":20157348,"avatar_url":"https://avatars.githubusercontent.com/u/20157348?v=3","gravatar_id":"","url":"https://api.github.com/users/sai-pullabhotla","html_url":"https://github.com/sai-pullabhotla","followers_url":"https://api.github.com/users/sai-pullabhotla/followers","following_url":"https://api.github.com/users/sai-pullabhotla/following{/other_user}","gists_url":"https://api.github.com/users/sai-pullabhotla/gists{/gist_id}","starred_url":"https://api.github.com/users/sai-pullabhotla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sai-pullabhotla/subscriptions","organizations_url":"https://api.github.com/users/sai-pullabhotla/orgs","repos_url":"https://api.github.com/users/sai-pullabhotla/repos","events_url":"https://api.github.com/users/sai-pullabhotla/events{/privacy}","received_events_url":"https://api.github.com/users/sai-pullabhotla/received_events","type":"User","site_admin":false},"labels":[{"id":175662213,"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/labels/API:%20datastore","name":"API: datastore","color":"c0c0c0","default":false},{"id":144595203,"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/labels/Type:%20Bug","name":"Type: Bug","color":"db4437","default":false}],"state":"open","locked":false,"assignee":{"login":"tswast","id":247555,"avatar_url":"https://avatars.githubusercontent.com/u/247555?v=3","gravatar_id":"","url":"https://api.github.com/users/tswast","html_url":"https://github.com/tswast","followers_url":"https://api.github.com/users/tswast/followers","following_url":"https://api.github.com/users/tswast/following{/other_user}","gists_url":"https://api.github.com/users/tswast/gists{/gist_id}","starred_url":"https://api.github.com/users/tswast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tswast/subscriptions","organizations_url":"https://api.github.com/users/tswast/orgs","repos_url":"https://api.github.com/users/tswast/repos","events_url":"https://api.github.com/users/tswast/events{/privacy}","received_events_url":"https://api.github.com/users/tswast/received_events","type":"User","site_admin":false},"assignees":[{"login":"tswast","id":247555,"avatar_url":"https://avatars.githubusercontent.com/u/247555?v=3","gravatar_id":"","url":"https://api.github.com/users/tswast","html_url":"https://github.com/tswast","followers_url":"https://api.github.com/users/tswast/followers","following_url":"https://api.github.com/users/tswast/following{/other_user}","gists_url":"https://api.github.com/users/tswast/gists{/gist_id}","starred_url":"https://api.github.com/users/tswast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tswast/subscriptions","organizations_url":"https://api.github.com/users/tswast/orgs","repos_url":"https://api.github.com/users/tswast/repos","events_url":"https://api.github.com/users/tswast/events{/privacy}","received_events_url":"https://api.github.com/users/tswast/received_events","type":"User","site_admin":false},{"login":"lesv","id":1136014,"avatar_url":"https://avatars.githubusercontent.com/u/1136014?v=3","gravatar_id":"","url":"https://api.github.com/users/lesv","html_url":"https://github.com/lesv","followers_url":"https://api.github.com/users/lesv/followers","following_url":"https://api.github.com/users/lesv/following{/other_user}","gists_url":"https://api.github.com/users/lesv/gists{/gist_id}","starred_url":"https://api.github.com/users/lesv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lesv/subscriptions","organizations_url":"https://api.github.com/users/lesv/orgs","repos_url":"https://api.github.com/users/lesv/repos","events_url":"https://api.github.com/users/lesv/events{/privacy}","received_events_url":"https://api.github.com/users/lesv/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2016-12-20T17:09:39Z","updated_at":"2017-02-23T00:52:19Z","closed_at":null,"body":"The GqlQuery.Builder allows positional and named bindings for FullEntity values. However, when I try to use those methods, the query execution fails with the below exception. Is this supposed to work? Same error occurs when using StructuredQuery.PropertyFilter. Am I misunderstanding the purpose of these methods? \r\n\r\n```\r\nException in thread \"main\" com.google.cloud.datastore.DatastoreException: An entity value is not allowed\r\n\tat com.google.cloud.datastore.spi.DefaultDatastoreRpc.translate(DefaultDatastoreRpc.java:110)\r\n\tat com.google.cloud.datastore.spi.DefaultDatastoreRpc.translate(DefaultDatastoreRpc.java:96)\r\n\tat com.google.cloud.datastore.spi.DefaultDatastoreRpc.runQuery(DefaultDatastoreRpc.java:164)\r\n\tat com.google.cloud.datastore.DatastoreImpl$1.call(DatastoreImpl.java:93)\r\n\tat com.google.cloud.datastore.DatastoreImpl$1.call(DatastoreImpl.java:89)\r\n\tat com.google.cloud.RetryHelper.doRetry(RetryHelper.java:179)\r\n\tat com.google.cloud.RetryHelper.runWithRetries(RetryHelper.java:244)\r\n\tat com.google.cloud.datastore.DatastoreImpl.runQuery(DatastoreImpl.java:88)\r\n\tat com.google.cloud.datastore.QueryResultsImpl.sendRequest(QueryResultsImpl.java:73)\r\n\tat com.google.cloud.datastore.QueryResultsImpl.<init>(QueryResultsImpl.java:57)\r\n\tat com.google.cloud.datastore.DatastoreImpl.run(DatastoreImpl.java:82)\r\n\tat com.google.cloud.datastore.DatastoreImpl.run(DatastoreImpl.java:73)\r\nCaused by: com.google.datastore.v1.client.DatastoreException: An entity value is not allowed, code=INVALID_ARGUMENT\r\n\tat com.google.datastore.v1.client.RemoteRpc.makeException(RemoteRpc.java:126)\r\n\tat com.google.datastore.v1.client.RemoteRpc.makeException(RemoteRpc.java:169)\r\n\tat com.google.datastore.v1.client.RemoteRpc.call(RemoteRpc.java:89)\r\n\tat com.google.datastore.v1.client.Datastore.runQuery(Datastore.java:108)\r\n\tat com.google.cloud.datastore.spi.DefaultDatastoreRpc.runQuery(DefaultDatastoreRpc.java:162)\r\n```\r\n\r\n### Sample Code \r\n\r\n```\r\nDatastore datastore = DatastoreOptions.getDefaultInstance().getService();\r\nFullEntity<IncompleteKey> cellNumber = FullEntity.newBuilder().set(\"countryCode\", \"1\").set(\"areaCode\", \"111\").set(\"subscriberNumber\", \"2223333\").build();\r\nGqlQuery query = Query.newGqlQueryBuilder(Query.ResultType.ENTITY, \"SELECT * FROM Contact WHERE cellNumber=@1\").addBinding(cellNumber).build();\r\nSystem.out.println(query);\r\nQueryResults<Entity> results = datastore.run(query);\r\nwhile (results.hasNext()) {\r\n\tSystem.out.println(results.next());\r\n}\r\n\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/comments/281854782","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-java/issues/1485#issuecomment-281854782","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/1485","id":281854782,"user":{"login":"tswast","id":247555,"avatar_url":"https://avatars.githubusercontent.com/u/247555?v=3","gravatar_id":"","url":"https://api.github.com/users/tswast","html_url":"https://github.com/tswast","followers_url":"https://api.github.com/users/tswast/followers","following_url":"https://api.github.com/users/tswast/following{/other_user}","gists_url":"https://api.github.com/users/tswast/gists{/gist_id}","starred_url":"https://api.github.com/users/tswast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tswast/subscriptions","organizations_url":"https://api.github.com/users/tswast/orgs","repos_url":"https://api.github.com/users/tswast/repos","events_url":"https://api.github.com/users/tswast/events{/privacy}","received_events_url":"https://api.github.com/users/tswast/received_events","type":"User","site_admin":false},"created_at":"2017-02-23T00:52:19Z","updated_at":"2017-02-23T00:52:19Z","body":"@lesv I'm not familiar with this specific feature of Datastore, either. I've only built queries with scalar types."}}
{"actor":{"display_login":"tswast"}}