Skip to content

@google-cloud/datastore 0.5.0 does not return entity keys with query results #1780

Description

@floodfx

Environment details

  • OS: MacOS 10.11.6
  • Node.js version: 6.9.1
  • npm version: 3.10.8
  • google-cloud-node version: 0.43.0
  • @google-cloud/datastore version: 0.5.0

Steps to reproduce

git clone [email protected]:GoogleCloudPlatform/nodejs-docs-samples.git
cd nodejs-docs-samples/datastore

Open quickstart.js
Add code below to end of the file

// query for entities
var q = datastoreClient.createQuery(kind)
q.run((err, entities, nextQuery) => {
  console.log(err, entities, nextQuery)
  for(var i = 0; i < entities.length; i++) {
    var task = entities[i];
    console.log(`Task ${task}: Key${task.key}`);
  }
});

Run

npm install
node quickstart.js

Keys returned with entity results.

Next update package.json to use 0.5.0 of @google-cloud/datastore

Run

node quickstart.js

Keys are "undefined".

Activity

  1. floodfx commented on Nov 9, 2016

    @floodfx
    Author

    Note the default version of @google-cloud/datastore for nodejs-docs-samples is "^0.1.1"

  2. stephenplusplus commented on Nov 9, 2016

    @stephenplusplus
    Contributor
  3. added a commit that references this issue on Mar 11, 2026
  4. added a commit that references this issue on Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions