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

[BUG] Sometimes, Key element in Datastore is parsed as id #874

Closed
dg3feiko opened this issue Sep 20, 2015 · 2 comments
Closed

[BUG] Sometimes, Key element in Datastore is parsed as id #874

dg3feiko opened this issue Sep 20, 2015 · 2 comments
Assignees
Labels
api: datastore Issues related to the Datastore API. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@dg3feiko
Copy link

Env

Node: 2.3.3
gcloud: 0.21.0

Problem

dataset.key(['Tracking2', "556ba07cbeb676ba7e9458e8"]) => key path: name =556ba07cbeb676ba7e9458e8
but
dataset.key(['Tracking2', "55479506996815820615e988"]) => key path: id=-9204792730274402000

Root cause

https://github.com/GoogleCloudPlatform/gcloud-node/blob/master/lib/datastore/entity.js#L227

> isNaN("556ba07cbeb676ba7e9458e8")
true
> isNaN("55479506996815820615e988")
false

explain: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/isNaN#Description

@jgeewax
Copy link
Contributor

jgeewax commented Sep 20, 2015 via email

@stephenplusplus
Copy link
Contributor

Very nice! A PR is welcome to use is.number instead, otherwise someone will jump on this soon. Thanks for reporting!

@stephenplusplus stephenplusplus added api: datastore Issues related to the Datastore API. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Sep 20, 2015
sofisl pushed a commit that referenced this issue Nov 11, 2022
chore: relocate owl bot post processor
sofisl pushed a commit that referenced this issue Jan 24, 2023
#874)

* build(node): add feat in node post-processor to add client library version number in snippet metadata

Co-authored-by: Benjamin E. Coe <[email protected]>
Source-Link: googleapis/synthtool@d337b88
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:d106724ad2a96daa1b8d88de101ba50bdb30b8df62ffa0aa2b451d93b4556641
sofisl pushed a commit that referenced this issue Jan 25, 2023
#874)

* build(node): add feat in node post-processor to add client library version number in snippet metadata

Co-authored-by: Benjamin E. Coe <[email protected]>
Source-Link: googleapis/synthtool@d337b88
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:d106724ad2a96daa1b8d88de101ba50bdb30b8df62ffa0aa2b451d93b4556641
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: datastore Issues related to the Datastore API. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

4 participants