GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Binding a FullEntity to a GqlQuery fails · Issue #1485 · googleapis/google-cloud-java

Binding a FullEntity to a GqlQuery fails #1485

New issue
Copy link
New issue
Copy link
Closed
#3024
Closed
Binding a FullEntity to a GqlQuery fails#1485
#3024
Copy link
Assignees
pongad
Labels
api: datastoreIssues related to the Datastore API.priority: p2Moderately-important priority. Fix may not be included in next release.type: questionRequest for information or clarification. Not an issue.

Description

@sai-pullabhotla
sai-pullabhotla
opened on Dec 20, 2016
Issue body actions

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?

Exception in thread "main" com.google.cloud.datastore.DatastoreException: An entity value is not allowed
	at com.google.cloud.datastore.spi.DefaultDatastoreRpc.translate(DefaultDatastoreRpc.java:110)
	at com.google.cloud.datastore.spi.DefaultDatastoreRpc.translate(DefaultDatastoreRpc.java:96)
	at com.google.cloud.datastore.spi.DefaultDatastoreRpc.runQuery(DefaultDatastoreRpc.java:164)
	at com.google.cloud.datastore.DatastoreImpl$1.call(DatastoreImpl.java:93)
	at com.google.cloud.datastore.DatastoreImpl$1.call(DatastoreImpl.java:89)
	at com.google.cloud.RetryHelper.doRetry(RetryHelper.java:179)
	at com.google.cloud.RetryHelper.runWithRetries(RetryHelper.java:244)
	at com.google.cloud.datastore.DatastoreImpl.runQuery(DatastoreImpl.java:88)
	at com.google.cloud.datastore.QueryResultsImpl.sendRequest(QueryResultsImpl.java:73)
	at com.google.cloud.datastore.QueryResultsImpl.<init>(QueryResultsImpl.java:57)
	at com.google.cloud.datastore.DatastoreImpl.run(DatastoreImpl.java:82)
	at com.google.cloud.datastore.DatastoreImpl.run(DatastoreImpl.java:73)
Caused by: com.google.datastore.v1.client.DatastoreException: An entity value is not allowed, code=INVALID_ARGUMENT
	at com.google.datastore.v1.client.RemoteRpc.makeException(RemoteRpc.java:126)
	at com.google.datastore.v1.client.RemoteRpc.makeException(RemoteRpc.java:169)
	at com.google.datastore.v1.client.RemoteRpc.call(RemoteRpc.java:89)
	at com.google.datastore.v1.client.Datastore.runQuery(Datastore.java:108)
	at com.google.cloud.datastore.spi.DefaultDatastoreRpc.runQuery(DefaultDatastoreRpc.java:162)

Sample Code

Datastore datastore = DatastoreOptions.getDefaultInstance().getService();
FullEntity<IncompleteKey> cellNumber = FullEntity.newBuilder().set("countryCode", "1").set("areaCode", "111").set("subscriberNumber", "2223333").build();
GqlQuery query = Query.newGqlQueryBuilder(Query.ResultType.ENTITY, "SELECT * FROM Contact WHERE cellNumber=@1").addBinding(cellNumber).build();
System.out.println(query);
QueryResults<Entity> results = datastore.run(query);
while (results.hasNext()) {
	System.out.println(results.next());
}

Activity

Next
  1. garrettjonesgoogle
    added
    api: datastoreIssues related to the Datastore API.
    on Jan 11, 2017
  2. shinfan
    added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    triaged for GA
    and removed
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    triaged for GA
    on Feb 23, 2017
  3. shinfan
    assigned
    lesv
    on Feb 23, 2017
  4. shinfan commented on Feb 23, 2017

    @shinfan
    shinfan
    on Feb 23, 2017
    Contributor
    More actions

    @lesv Can you determine if this is release blocking?

  5. shinfan
    added
    blocking GA
    Status: Release Blocking
    and removed
    blocking GA
    on Feb 23, 2017
  6. garrettjonesgoogle
    removed
    Status: Release Blocking
    on Feb 23, 2017
  7. lesv
    assigned
    tswast
    on Feb 23, 2017
  8. lesv commented on Feb 23, 2017

    @lesv
    lesv
    on Feb 23, 2017
    Contributor
    More actions

    @tswast Care to look? I need to lookup a bunch of stuff that you might know off the top of your head.

  9. tswast commented on Feb 23, 2017

    @tswast
    tswast
    on Feb 23, 2017
    Contributor
    More actions

    @lesv I'm not familiar with this specific feature of Datastore, either. I've only built queries with scalar types.

  10. 279 remaining items

    Load more actions
  11. suztomo
    added 3 commits that reference this issue on Mar 30, 2026

    fix: enable longpaths support for windows test (#1485) (#951)

    4ade6ab

    chore(main): release 0.124.9 (#952)

    43ddd75

    deps: update dependency org.ow2.asm:asm to v9.7.1 (#1485)

    b5fd45c
  12. lqiu96
    added 3 commits that reference this issue on Apr 1, 2026

    fix: enable longpaths support for windows test (#1485) (#951)

    8859a68

    chore(main): release 0.124.9 (#952)

    eb1eb0c

    deps: update dependency org.ow2.asm:asm to v9.7.1 (#1485)

    f3e56cf
  13. meltsufin
    added 6 commits that reference this issue on Apr 29, 2026

    fix: enable longpaths support for windows test (#1485) (#1191)

    c4b8d90

    deps: update dependency org.graalvm.buildtools:native-maven-plugin to…

    d0e9b2a

    chore(main): release 1.123.3 (#1482)

    99652fb

    fix: enable longpaths support for windows test (#1485) (#1191)

    c8dba42

    deps: update dependency org.graalvm.buildtools:native-maven-plugin to…

    bc58522

    chore(main): release 1.123.3 (#1482)

    0acea0e
  14. benjaminp
    added 3 commits that reference this issue on Jul 13, 2026

    build: enable longpaths support for windows test (googleapis#1485) (g…

    675a883

    chore(deps): update dependency protobuf to v3.20.2 (googleapis#1659) (g…

    03c3cfb

    feat: Support Cloud Bigtable Changestream (googleapis#1569)

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

Metadata

Metadata

Assignees

  • @pongad
    pongad

Labels

api: datastoreIssues related to the Datastore API.priority: p2Moderately-important priority. Fix may not be included in next release.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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.