Skip to content

Commit

Permalink
improve docs and set version to v0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
antkorwin committed Mar 26, 2019
1 parent ccf397b commit f8f28be
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
42 changes: 42 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,48 @@ then you can write multiple arrays of necessary types in a dataset:
<1> first document array
<2> second document array

### Nested documents

You can describe nested objects in your dataset.
Let's look at the the next model:

[source, java]
----
@Data
@Document
public class FooBar {
@Id
private String id;
private String data;
private Bar bar; <1>
}
@Data
@Document
public class Bar {
@Id
private String id;
private String data;
}
----
<1> nested object with another type

so, you can describe a dataset for this example as shown below:

[source, json]
----
{
"com.jupiter.tools.spring.test.mongo.FooBar" : [ {
"id": "55f1dd90a1246a44e118300b",
"data" : "TOP LEVEL DATA",
"bar": {
"id": "88f3ed00b1375a48e619900c",
"data":"NESTED DATA"
}
}]
}
----

### Date and time in dataset

To set a date and time value in a field you can use
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.antkorwin</groupId>
<artifactId>spring-test-mongo</artifactId>
<version>0.12-SNAPSHOT</version>
<version>0.12</version>
<packaging>jar</packaging>

<name>spring-test-mongo</name>
Expand Down

0 comments on commit f8f28be

Please sign in to comment.