Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
floodfx opened this issue Nov 9, 2016 · 2 comments
Closed
Assignees

Comments

@floodfx
Copy link

floodfx commented Nov 9, 2016

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 git@github.com: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".

@floodfx
Copy link
Author

floodfx commented Nov 9, 2016

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

@stephenplusplus
Copy link
Contributor

This issue was moved to GoogleCloudPlatform/nodejs-docs-samples#250

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants