Skip to content

Commit 39aed7e

Browse files
BenWhiteheadkurtisvg
authored andcommitted
Add explicit ListValue to datastore_array_value (#1486)
1 parent 245a077 commit 39aed7e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import com.google.cloud.datastore.IncompleteKey;
3434
import com.google.cloud.datastore.Key;
3535
import com.google.cloud.datastore.KeyFactory;
36+
import com.google.cloud.datastore.ListValue;
3637
import com.google.cloud.datastore.PathElement;
3738
import com.google.cloud.datastore.ProjectionEntity;
3839
import com.google.cloud.datastore.Query;
@@ -224,7 +225,7 @@ public void testArrayValue() {
224225
// [START datastore_array_value]
225226
Entity task = Entity.newBuilder(taskKey)
226227
.set("tags", "fun", "programming")
227-
.set("collaborators", "alice", "bob")
228+
.set("collaborators", ListValue.of("alice", "bob"))
228229
.build();
229230
// [END datastore_array_value]
230231
assertValidEntity(task);

0 commit comments

Comments
 (0)