GeezerVison is showing github.com (truncated) — fix allocateId so it cannot be called on complete keys by neozwu · Pull Request #1783 · googleapis/google-cloud-java
Conversation
fix #1567 to not allow allocateId to be called on Key object (i.e. complete keys), since:
- allocateId in google cloud datastore doesn't support the function of reserving a user-specified numeric Id (which is supported in GAE datastore)
- calling
allocateId on key will simply erase the current id and assign a new random id, which may not be what users expect. (Users may expect calling allocatedId on a key will reserve the id in that key)
- the api service will throw an error if a complete key is passed in.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
@@ -532,14 +528,11 @@ public void testAllocateIdArray() { |
|
|
Key key3 = keyFactory.newKey("name");
|
|
|
Key key4 = keyFactory.newKey(1);
|
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|

Coverage decreased (-0.7%) to 80.801% when pulling 73cd6da on neozwu:fix-allocateId into 0a2bf7f on GoogleCloudPlatform:master.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
meltsufin
pushed a commit
that referenced
this pull request
Dec 22, 2025
* chore(main): release 3.22.0
* chore: generate libraries at Tue Mar 18 14:57:07 UTC 2025
---------
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: cloud-java-bot <[email protected]>
chingor13
pushed a commit
that referenced
this pull request
Jan 22, 2026
* chore(main): release 2.27.0
* chore: generate libraries at Wed Mar 5 23:02:15 UTC 2025
---------
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: cloud-java-bot <[email protected]>
suztomo
pushed a commit
to suztomo/google-cloud-java
that referenced
this pull request
Mar 11, 2026
* chore(main): release 3.22.0
* chore: generate libraries at Tue Mar 18 14:57:07 UTC 2025
---------
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: cloud-java-bot <[email protected]>
lqiu96
pushed a commit
that referenced
this pull request
Mar 20, 2026
* chore(main): release 2.27.0
* chore: generate libraries at Wed Mar 5 23:02:15 UTC 2025
---------
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: cloud-java-bot <[email protected]>
suztomo
pushed a commit
to suztomo/google-cloud-java
that referenced
this pull request
Mar 23, 2026
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>