Skip to content
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

Need an easy way to contruct a Key with parent #1003

Closed
seymores opened this issue May 12, 2016 · 4 comments
Closed

Need an easy way to contruct a Key with parent #1003

seymores opened this issue May 12, 2016 · 4 comments
Assignees
Labels
api: datastore Issues related to the Datastore API.

Comments

@seymores
Copy link

seymores commented May 12, 2016

Maybe I missed some docs but I can't figure out how to construct a key with parent. Definitely need an example on how to do this.
I'm using version 0.2.1.

@ajkannan
Copy link

Hi @seymores, this Cloud Datastore docs page has some text and a short example on creating a key with a parent.

@mziccard mziccard added the api: datastore Issues related to the Datastore API. label May 12, 2016
@ajkannan
Copy link

ajkannan commented May 12, 2016

In addition to the example in the above link (which uses PathElement), gcloud-java also has a shorthand for adding a parent (see the methods 2nd and 3rd from the bottom in Key's API docs page). For example, if you have a parent myParentKey of type Key, you can use something like:

Key childKey = Key.builder(myParentKey, "ChildKeyKind", "ChildKeyName").build();

@volgin
Copy link

volgin commented May 16, 2016

For anyone else looking at this issue:

Key key = datastore.newKeyFactory()
        .projectId(PROJECT)
        .kind(ENTITY_KIND)
        .ancestors(PathElement.of(PARENT_KIND, PARENT_ID))
        .newKey(ID_OR_NAME);

@mziccard
Copy link
Contributor

Closing this as both @ajkannan and @volgin answered. Thanks guys.

github-actions bot pushed a commit that referenced this issue Aug 9, 2022
…form-v1beta1 to v0.17.0 (#1003)

[![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.api.grpc:proto-google-cloud-aiplatform-v1beta1](https://github.com/googleapis/java-) | `0.15.7` -> `0.17.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:proto-google-cloud-aiplatform-v1beta1/0.17.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:proto-google-cloud-aiplatform-v1beta1/0.17.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:proto-google-cloud-aiplatform-v1beta1/0.17.0/compatibility-slim/0.15.7)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.api.grpc:proto-google-cloud-aiplatform-v1beta1/0.17.0/confidence-slim/0.15.7)](https://docs.renovatebot.com/merge-confidence/) |

---

### 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-aiplatform).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xMzUuMSIsInVwZGF0ZWRJblZlciI6IjMyLjEzNS4xIn0=-->
github-actions bot pushed a commit that referenced this issue Aug 9, 2022
🤖 I have created a release *beep* *boop*
---


## [3.2.0](googleapis/java-aiplatform@v3.1.0...v3.2.0) (2022-08-09)


### Features

* add a DeploymentResourcePool API resource_definition ([#997](googleapis/java-aiplatform#997)) ([82551d8](googleapis/java-aiplatform@82551d8))
* add DeploymentResourcePool in aiplatform v1beta1 deployment_resource_pool.proto ([#998](googleapis/java-aiplatform#998)) ([76dc64f](googleapis/java-aiplatform@76dc64f))
* add DeploymentResourcePoolService in aiplatform v1beta1 deployment_resource_pool_service.proto ([76dc64f](googleapis/java-aiplatform@76dc64f))
* add shared_resources for supported prediction_resources ([82551d8](googleapis/java-aiplatform@82551d8))
* add SHARED_RESOURCES to DeploymentResourcesType in aiplatform v1beta1 model.proto ([76dc64f](googleapis/java-aiplatform@76dc64f))
* added SHARED_RESOURCES enum to aiplatform v1 model.proto ([301cfb0](googleapis/java-aiplatform@301cfb0))
* DeploymentResourcePool and DeployementResourcePoolService added to aiplatform v1beta1 model.proto (cl/463147866) ([301cfb0](googleapis/java-aiplatform@301cfb0))
* making network arg optional in aiplatform v1 custom_job.proto ([#999](googleapis/java-aiplatform#999)) ([301cfb0](googleapis/java-aiplatform@301cfb0))
* making network arg optional in aiplatform v1beta1 custom_job.proto ([301cfb0](googleapis/java-aiplatform@301cfb0))
* **samples:** add all feature samples ([#980](googleapis/java-aiplatform#980)) ([8c2a485](googleapis/java-aiplatform@8c2a485))
* **samples:** add all feature values samples ([#981](googleapis/java-aiplatform#981)) ([2d4e6fe](googleapis/java-aiplatform@2d4e6fe))


### Bug Fixes

* declaring test-scope artifact as runtime ([#1014](googleapis/java-aiplatform#1014)) ([6c47c65](googleapis/java-aiplatform@6c47c65))


### Documentation

* doc edits to aiplatform v1 dataset_service.proto, job_service.proto, model_service.proto, pipeline_service.proto, saved_query.proto, study.proto, types.proto ([301cfb0](googleapis/java-aiplatform@301cfb0))
* doc edits to aiplatform v1beta1 job_service.proto, model_service.proto, pipeline_service.proto, saved_query.proto, study.proto, types.proto ([301cfb0](googleapis/java-aiplatform@301cfb0))


### Dependencies

* update dependency com.google.api.grpc:proto-google-cloud-aiplatform-v1beta1 to v0.17.0 ([#1003](googleapis/java-aiplatform#1003)) ([b793732](googleapis/java-aiplatform@b793732))
* update dependency com.google.cloud:google-cloud-bigquery to v2.14.1 ([#1006](googleapis/java-aiplatform#1006)) ([6bb8982](googleapis/java-aiplatform@6bb8982))
* update dependency com.google.cloud:google-cloud-bigquery to v2.14.3 ([#1009](googleapis/java-aiplatform#1009)) ([8cca8b5](googleapis/java-aiplatform@8cca8b5))
* update dependency com.google.cloud:google-cloud-shared-dependencies to v3 ([#1000](googleapis/java-aiplatform#1000)) ([c93de30](googleapis/java-aiplatform@c93de30))
* update dependency com.google.cloud:google-cloud-storage to v2.10.0 ([#1004](googleapis/java-aiplatform#1004)) ([dd52cad](googleapis/java-aiplatform@dd52cad))
* update dependency com.google.cloud:google-cloud-storage to v2.11.0 ([#1005](googleapis/java-aiplatform#1005)) ([60e2f76](googleapis/java-aiplatform@60e2f76))
* update dependency com.google.cloud:google-cloud-storage to v2.11.1 ([#1008](googleapis/java-aiplatform#1008)) ([9a2fe64](googleapis/java-aiplatform@9a2fe64))
* update dependency com.google.cloud:google-cloud-storage to v2.11.2 ([#1010](googleapis/java-aiplatform#1010)) ([3c2ac16](googleapis/java-aiplatform@3c2ac16))
* update dependency com.google.code.gson:gson to v2.9.1 ([#1001](googleapis/java-aiplatform#1001)) ([a6ffed4](googleapis/java-aiplatform@a6ffed4))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
github-actions bot pushed a commit that referenced this issue Oct 10, 2022
🤖 I have created a release *beep* *boop*
---


### Updating meta-information for bleeding-edge SNAPSHOT release.

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
suztomo pushed a commit that referenced this issue Feb 1, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [org.threeten:threetenbp](https://www.threeten.org/threetenbp) ([source](https://github.com/ThreeTen/threetenbp)) | `1.6.3` -> `1.6.4` | [![age](https://badges.renovateapi.com/packages/maven/org.threeten:threetenbp/1.6.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.threeten:threetenbp/1.6.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.threeten:threetenbp/1.6.4/compatibility-slim/1.6.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.threeten:threetenbp/1.6.4/confidence-slim/1.6.3)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>ThreeTen/threetenbp</summary>

### [`v1.6.4`](https://github.com/ThreeTen/threetenbp/releases/tag/v1.6.4)

[Compare Source](https://github.com/ThreeTen/threetenbp/compare/v1.6.3...v1.6.4)

See the [change notes](https://www.threeten.org/threetenbp/changes-report.html) for more information.

</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, check this box

---

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-core).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC42LjEiLCJ1cGRhdGVkSW5WZXIiOiIzNC45LjIifQ==-->
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.
Projects
None yet
Development

No branches or pull requests

4 participants