-
Notifications
You must be signed in to change notification settings - Fork 639
Closed
Labels
api: datastoreIssues related to the Datastore API.Issues related to the Datastore API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
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
Metadata
Metadata
Assignees
Labels
api: datastoreIssues related to the Datastore API.Issues related to the Datastore API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.