Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updated property definition docs

  • Loading branch information...
commit 935e84b4fb2128af007272f531024c2c4ee4f3ce 1 parent 1c04850
@nw nw authored
Showing with 7 additions and 3 deletions.
  1. +7 −3 README.md
View
10 README.md
@@ -133,9 +133,13 @@ To remove an existing one:
properties: [ 'name', {'tags': []} ]
- To define embedded objects:
+ To define nested objects:
- properties: [ 'name', [{blogposts: [['title', 'body', ...]]}] ]
+ properties: [ 'name', {contact: ['email', 'phone', ...]} ]
+
+ To define array of embedded objects:
+
+ properties: [ 'name', {blogposts: [['title', 'body', ...]]} ]
`_id` is added automatically for all models.
@@ -149,7 +153,7 @@ To remove an existing one:
- *cast*
- Defines type casting. By default, all properties beginning with `_` are cast to `ObjectID`. (note: Casting an Array will cast all items in an the Array. Currently, Arrays cast when 'save' is called.)
+ Defines type casting. By default, all properties beginning with `_` are cast to `ObjectID`. (note: Casting an Array will cast all items in the Array. Currently, Arrays cast when 'save' is called.)
- *indexes*
Please sign in to comment.
Something went wrong with that request. Please try again.