8000 docs(samples): Update datastore_basic_entity sample to include `taskK… · MechOrigin/java-docs-samples@3656dad · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 3656dad

Browse files
authored
docs(samples): Update datastore_basic_entity sample to include taskKey definition (GoogleCloudPlatform#1350)
1 parent 7b355b5 commit 3656dad

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

datastore/src/test/java/com/google/datastore/snippets/ConceptsTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,9 @@ public void testArrayValue() {
233233
@Test
234234
public void testBasicEntity() {
235235
// [START datastore_basic_entity]
236+
Key taskKey = datastore.newKeyFactory()
237+
.setKind("Task")
238+
.newKey("sampleTask");
236239
Entity task = Entity.newBuilder(taskKey)
237240 3F13
.set("category", "Personal")
238241
.set("done", false)

0 commit comments

Comments
 (0)
0