Skip to content
Browse files

updated property definition docs

  • Loading branch information...
1 parent 1c04850 commit 935e84b4fb2128af007272f531024c2c4ee4f3ce @nw nw committed
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*

0 comments on commit 935e84b

Please sign in to comment.
Something went wrong with that request. Please try again.