Skip to content

Commit 249e9cc

Browse files
authored
Update page.md
Added information about optional foreigns
1 parent f666100 commit 249e9cc

File tree

1 file changed

+10
-1
lines changed
  • src/app/docs/schema-reference-guide

1 file changed

+10
-1
lines changed

src/app/docs/schema-reference-guide/page.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1408,6 +1408,15 @@ The actual definition of person might be given in its home data product as:
14081408
"name" : "xsd:string" }
14091409
```
14101410

1411+
And to use a field with an optional `Person` foreign field, this is how to define the property, just like any other reference, using the `@class`.
1412+
1413+
```json
1414+
"Test": {
1415+
"@class": "Person",
1416+
"@type": "Optional"
1417+
}
1418+
```
1419+
14111420
#### Code: An example creating and referring to a foreign type
14121421

14131422
From the command line we can see how an HR data product might interact with an Events data product.
@@ -1693,4 +1702,4 @@ We can then insert a point document which might be written as:
16931702
"type" : "Point",
16941703
"coordinates" : [33.2,24.0]
16951704
}
1696-
```
1705+
```

0 commit comments

Comments
 (0)