Skip to content

Entity Keys: remove convertion of id string to integer#179

Merged
sebelga merged 1 commit intomasterfrom
fix/remove-entitykey-parse-id
Sep 10, 2019
Merged

Entity Keys: remove convertion of id string to integer#179
sebelga merged 1 commit intomasterfrom
fix/remove-entitykey-parse-id

Conversation

@sebelga
Copy link
Owner

@sebelga sebelga commented Sep 10, 2019

The live Datastore treats the same way User.get("123") than User.get(123). Both return the entity
with the Key.id being "123". The conversion from string to integer has been removed inside gstore
and let to the consumer to implement if needed.

BREAKING CHANGE: The "keyType" Schema option has been removed as it is no longer needed. Also, as gstore does not parse the id anymore, running your project against the local Datastore emulator might break as the emulator treats differently User.get(123) than User.get("123"). Auto-allocated ids are integers and need to be provided as integers to the Emulator.

Fixes #168

…ity key id

The live Datastore treats the same way User.get("123") than User.get(123). Both return the entity
with the Key.id being "123". The convertion from string to integer has been removed inside gstore
and let to the consumer to implement if needed.

BREAKING CHANGE: The "keyType" Schema option has been removed as it is no longer needed. Also, as
gstore does not parse the id anymore, running your project against the Datastore emulator locally
might break as the emulator treats differently User.get(123) than User.get("123"). Auto-allocated
ids are integer and need to be provided as integer for the Emulator.

#168
@coveralls
Copy link

Coverage Status

Coverage increased (+0.05%) to 97.332% when pulling 013e731 on fix/remove-entitykey-parse-id into 16999cb on master.

@sebelga sebelga merged commit 75dc869 into master Sep 10, 2019
@sebelga sebelga deleted the fix/remove-entitykey-parse-id branch September 10, 2019 06:13
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

Successfully merging this pull request may close these issues.

parseId in entity.js and model.js are different, leads to problems with keyType:name

2 participants