You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`@Document(collectionName = "usersCollection")` annotation configures the collection name for the documents of this type.
@@ -112,6 +111,18 @@ This annotation is optional, by default the collection name is derived from the
112
111
113
112
NOTE: Internally we use Firestore client library object mapping. See https://developers.google.com/android/reference/com/google/firebase/firestore/package-summary[the documentation] for supported annotations.
114
113
114
+
==== Embedded entities and lists
115
+
Spring Data Cloud Firestore supports embedded properties of custom types and lists.
116
+
Given a custom POJO definition, you can have properties of this type or lists of this type in your entities.
117
+
They are stored as embedded documents (or arrays, correspondingly) in the Cloud Firestore.
https://docs.spring.io/spring-data/commons/docs/current/api/org/springframework/data/repository/reactive/ReactiveCrudRepository.html[Spring Data Repositories] is an abstraction that can reduce boilerplate code.
Copy file name to clipboardexpand all lines: spring-cloud-gcp-data-firestore/src/test/java/org/springframework/cloud/gcp/data/firestore/it/FirestoreRepositoryIntegrationTests.java
+8-1
Original file line number
Diff line number
Diff line change
@@ -94,7 +94,10 @@ public void countTest() {
94
94
@Test
95
95
//tag::repository_built_in[]
96
96
publicvoidwriteReadDeleteTest() {
97
-
Useralice = newUser("Alice", 29);
97
+
List<User.Address> addresses = Arrays.asList(newUser.Address("123 Alice st", "US"),
98
+
newUser.Address("1 Alice ave", "US"));
99
+
User.AddresshomeAddress = newUser.Address("10 Alice blvd", "UK");
0 commit comments