Skip to content

Commit f8f28be

Browse files
committed
improve docs and set version to v0.12
1 parent ccf397b commit f8f28be

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

README.adoc

+42
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,48 @@ then you can write multiple arrays of necessary types in a dataset:
199199
<1> first document array
200200
<2> second document array
201201

202+
### Nested documents
203+
204+
You can describe nested objects in your dataset.
205+
Let's look at the the next model:
206+
207+
[source, java]
208+
----
209+
@Data
210+
@Document
211+
public class FooBar {
212+
@Id
213+
private String id;
214+
private String data;
215+
private Bar bar; <1>
216+
}
217+
218+
@Data
219+
@Document
220+
public class Bar {
221+
@Id
222+
private String id;
223+
private String data;
224+
}
225+
----
226+
<1> nested object with another type
227+
228+
so, you can describe a dataset for this example as shown below:
229+
230+
[source, json]
231+
----
232+
{
233+
"com.jupiter.tools.spring.test.mongo.FooBar" : [ {
234+
"id": "55f1dd90a1246a44e118300b",
235+
"data" : "TOP LEVEL DATA",
236+
"bar": {
237+
"id": "88f3ed00b1375a48e619900c",
238+
"data":"NESTED DATA"
239+
}
240+
}]
241+
}
242+
----
243+
202244
### Date and time in dataset
203245

204246
To set a date and time value in a field you can use

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.antkorwin</groupId>
77
<artifactId>spring-test-mongo</artifactId>
8-
<version>0.12-SNAPSHOT</version>
8+
<version>0.12</version>
99
<packaging>jar</packaging>
1010

1111
<name>spring-test-mongo</name>

0 commit comments

Comments
 (0)