Repository navigation
[BUG] Sometimes, Key element in Datastore is parsed as id #874
Copy link
Copy link
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
Activity
- Woah-- tricky. Nice catch.
Very nice! A PR is welcome to use
is.numberinstead, otherwise someone will jump on this soon. Thanks for reporting!- addedapi: 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.
on Sep 20, 2015 - added a commit that references this issue
on Nov 11, 2022 - added 6 commits that reference this issue
on Jan 27, 2026 1 remaining item
- added a commit that references this issue
on Feb 17, 2026 - added a commit that references this issue
on Mar 5, 2026 - added a commit that references this issue
on Mar 5, 2026 - added a commit that references this issue
on Mar 11, 2026 - added a commit that references this issue
on Mar 18, 2026 - added 2 commits that reference this issue
on Mar 23, 2026 - added a commit that references this issue
on Mar 27, 2026 - added a commit that references this issue
on May 5, 2026
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.
Env
Node: 2.3.3
gcloud: 0.21.0
Problem
dataset.key(['Tracking2', "556ba07cbeb676ba7e9458e8"]) => key path:
name =556ba07cbeb676ba7e9458e8but
dataset.key(['Tracking2', "55479506996815820615e988"])=> key path:id=-9204792730274402000Root cause
https://github.com/GoogleCloudPlatform/gcloud-node/blob/master/lib/datastore/entity.js#L227
explain: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/isNaN#Description