-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Datastore question] How to build AllocateIdRequest? #1428
Labels
api: datastore
Issues related to the Datastore API.
type: question
Request for information or clarification. Not an issue.
Comments
I will try to investigate this question within a few days. |
garrettjonesgoogle
added
api: datastore
Issues related to the Datastore API.
type: question
Request for information or clarification. Not an issue.
triaged for beta
labels
Dec 1, 2016
@GabiAxel - Are you possibly looking for something like this? Datastore ds = DatastoreOptions.newBuilder().build().getService();
//Create an incomplete key for kind, MyKind...
IncompleteKey incompleteKey = ds.newKeyFactory().setKind("MyKind").newKey();
System.out.println(incompleteKey);
//Allocate the ID
Key completeKey = ds.allocateId(incompleteKey);
System.out.println(completeKey); This would print the below to the console:
|
Yes, that's it. Thanks. |
Looks like the question was answered - closing out the issue. |
github-actions bot
pushed a commit
that referenced
this issue
Aug 9, 2022
…0.8 (#1428) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-pubsub](https://togithub.com/googleapis/java-pubsub) | `1.120.0` -> `1.120.8` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.8/compatibility-slim/1.120.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-pubsub/1.120.8/confidence-slim/1.120.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>googleapis/java-pubsub</summary> ### [`v1.120.8`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​11208-httpsgithubcomgoogleapisjava-pubsubcomparev11207v11208-2022-08-02) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.120.7...v1.120.8) ##### Dependencies - update dependency com.google.cloud:google-cloud-core to v2.8.6 ([#​1222](https://togithub.com/googleapis/java-pubsub/issues/1222)) ([55eebf5](https://togithub.com/googleapis/java-pubsub/commit/55eebf55785a700a67dc3a97b21837acf14d9a64)) ### [`v1.120.7`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​11207-httpsgithubcomgoogleapisjava-pubsubcomparev11206v11207-2022-08-01) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.120.6...v1.120.7) ##### Bug Fixes - Updated log level from WARNING -> INFO for EOD failures ([#​1218](https://togithub.com/googleapis/java-pubsub/issues/1218)) ([8782533](https://togithub.com/googleapis/java-pubsub/commit/8782533204fcc312c1063763f5073db83c72382f)) ### [`v1.120.6`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​11206-httpsgithubcomgoogleapisjava-pubsubcomparev11205v11206-2022-08-01) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.120.5...v1.120.6) ##### Dependencies - update dependency com.google.cloud:google-cloud-bigquery to v2.14.1 ([#​1215](https://togithub.com/googleapis/java-pubsub/issues/1215)) ([5667492](https://togithub.com/googleapis/java-pubsub/commit/56674928f2e671487c8d4c0dad4e45368da47e0e)) - update dependency com.google.cloud:google-cloud-core to v2.8.5 ([#​1213](https://togithub.com/googleapis/java-pubsub/issues/1213)) ([5db0c2c](https://togithub.com/googleapis/java-pubsub/commit/5db0c2cafcf27a80ac4e18c623fc22c2af252774)) - update dependency com.google.protobuf:protobuf-java-util to v3.21.4 ([#​1214](https://togithub.com/googleapis/java-pubsub/issues/1214)) ([bfc53d9](https://togithub.com/googleapis/java-pubsub/commit/bfc53d9fb616b4ee22e2c39dbaf1eed7354142a7)) - update dependency org.apache.avro:avro to v1.11.1 ([#​1210](https://togithub.com/googleapis/java-pubsub/issues/1210)) ([fafcded](https://togithub.com/googleapis/java-pubsub/commit/fafcdede6b4e5ef5098b8b04a53d9e42b59cda3d)) ### [`v1.120.5`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​11205-httpsgithubcomgoogleapisjava-pubsubcomparev11204v11205-2022-07-30) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.120.4...v1.120.5) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v3 ([#​1207](https://togithub.com/googleapis/java-pubsub/issues/1207)) ([d355509](https://togithub.com/googleapis/java-pubsub/commit/d355509be963b7d2c357d2c9dd3f97eaa5fd8717)) ### [`v1.120.4`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​11204-httpsgithubcomgoogleapisjava-pubsubcomparev11203v11204-2022-07-29) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.120.3...v1.120.4) ##### Bug Fixes - updating return types of ack/nack futures to be consistent with publish ([#​1204](https://togithub.com/googleapis/java-pubsub/issues/1204)) ([6e73ab9](https://togithub.com/googleapis/java-pubsub/commit/6e73ab9618f61ee1915e52abe3b80e356bc3c13f)) ### [`v1.120.3`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​11203-httpsgithubcomgoogleapisjava-pubsubcomparev11202v11203-2022-07-27) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.120.2...v1.120.3) ##### Dependencies - update dependency org.junit.vintage:junit-vintage-engine to v5.9.0 ([#​1201](https://togithub.com/googleapis/java-pubsub/issues/1201)) ([f18e562](https://togithub.com/googleapis/java-pubsub/commit/f18e5628f54b0ae6858cd046a11824a1698c50c6)) ### [`v1.120.2`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​11202-httpsgithubcomgoogleapisjava-pubsubcomparev11201v11202-2022-07-25) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.120.1...v1.120.2) ##### Bug Fixes - enable longpaths support for windows test ([#​1485](https://togithub.com/googleapis/java-pubsub/issues/1485)) ([#​1191](https://togithub.com/googleapis/java-pubsub/issues/1191)) ([c4b8d90](https://togithub.com/googleapis/java-pubsub/commit/c4b8d90a158a3360d626df8ca6378212e09f5a47)) - PubSubMessage leak on MessageDispatcher ([#​1197](https://togithub.com/googleapis/java-pubsub/issues/1197)) ([1b8c440](https://togithub.com/googleapis/java-pubsub/commit/1b8c440fccc51dc2291c43b2972b1f5c08dfd65a)) ##### Dependencies - update dependency org.graalvm.buildtools:junit-platform-native to v0.9.13 ([#​1189](https://togithub.com/googleapis/java-pubsub/issues/1189)) ([0d96f8e](https://togithub.com/googleapis/java-pubsub/commit/0d96f8e2006c145de039d2f00c5eb1d8830eae3d)) - update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.13 ([#​1190](https://togithub.com/googleapis/java-pubsub/issues/1190)) ([c604080](https://togithub.com/googleapis/java-pubsub/commit/c6040802bcf97d063e2b91cdb5fa7fe3c3e3b807)) ### [`v1.120.1`](https://togithub.com/googleapis/java-pubsub/blob/HEAD/CHANGELOG.md#​11201-httpsgithubcomgoogleapisjava-pubsubcomparev11200v11201-2022-07-11) [Compare Source](https://togithub.com/googleapis/java-pubsub/compare/v1.120.0...v1.120.1) ##### Dependencies - update dependency com.google.cloud:google-cloud-bigquery to v2.13.8 ([#​1179](https://togithub.com/googleapis/java-pubsub/issues/1179)) ([5fc8f86](https://togithub.com/googleapis/java-pubsub/commit/5fc8f86b30cafaba1acde6f1f807b345e3b3b953)) - update dependency com.google.cloud:google-cloud-core to v2.8.1 ([#​1178](https://togithub.com/googleapis/java-pubsub/issues/1178)) ([0052a6c](https://togithub.com/googleapis/java-pubsub/commit/0052a6c093030eaefa412cb0a8e35787a9b35c01)) - update dependency com.google.protobuf:protobuf-java-util to v3.21.2 ([#​1176](https://togithub.com/googleapis/java-pubsub/issues/1176)) ([8ffe189](https://togithub.com/googleapis/java-pubsub/commit/8ffe189170e58cab1de630c41cab6cd8346f98b0)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigquerydatatransfer). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xMzUuMSIsInVwZGF0ZWRJblZlciI6IjMyLjEzNS4xIn0=-->
github-actions bot
pushed a commit
that referenced
this issue
Aug 9, 2022
🤖 I have created a release *beep* *boop* --- ## [2.3.3](googleapis/java-bigquerydatatransfer@v2.3.2...v2.3.3) (2022-08-09) ### Dependencies * update dependency com.google.cloud:google-cloud-bigquery to v2.14.1 ([#1430](googleapis/java-bigquerydatatransfer#1430)) ([befed25](googleapis/java-bigquerydatatransfer@befed25)) * update dependency com.google.cloud:google-cloud-bigquery to v2.14.2 ([#1433](googleapis/java-bigquerydatatransfer#1433)) ([30b6942](googleapis/java-bigquerydatatransfer@30b6942)) * update dependency com.google.cloud:google-cloud-bigquery to v2.14.3 ([#1434](googleapis/java-bigquerydatatransfer#1434)) ([5c054b0](googleapis/java-bigquerydatatransfer@5c054b0)) * update dependency com.google.cloud:google-cloud-pubsub to v1.120.10 ([#1432](googleapis/java-bigquerydatatransfer#1432)) ([4ab39e9](googleapis/java-bigquerydatatransfer@4ab39e9)) * update dependency com.google.cloud:google-cloud-pubsub to v1.120.8 ([#1428](googleapis/java-bigquerydatatransfer#1428)) ([ddab51f](googleapis/java-bigquerydatatransfer@ddab51f)) * update dependency com.google.cloud:google-cloud-pubsub to v1.120.9 ([#1431](googleapis/java-bigquerydatatransfer#1431)) ([f909343](googleapis/java-bigquerydatatransfer@f909343)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v3 ([#1426](googleapis/java-bigquerydatatransfer#1426)) ([8a2c31e](googleapis/java-bigquerydatatransfer@8a2c31e)) * update dependency com.google.protobuf:protobuf-java-util to v3.21.3 ([#1423](googleapis/java-bigquerydatatransfer#1423)) ([50bc04e](googleapis/java-bigquerydatatransfer@50bc04e)) * update dependency com.google.protobuf:protobuf-java-util to v3.21.4 ([#1425](googleapis/java-bigquerydatatransfer#1425)) ([60d8c78](googleapis/java-bigquerydatatransfer@60d8c78)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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: question
Request for information or clarification. Not an issue.
Greetings,
As I understand, a Java
AllocateIdsRequest
instance can be built usingKey
s orPathElement
s, but according to the API it expects the key to contain incomplete paths. I saw no public way to build aKey
without an id or name, and I no public way to get the path of anIncompleteKey
. Can you please provide and example of building anAllocateIdsRequest
from a string representing the kind? Also, wouldn't it make sense to be able to buildAllocateIdsRequest
fromIncompleteKey
s?Thanks.
The text was updated successfully, but these errors were encountered: