Skip to content

Commit

Permalink
updated property definition docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nw committed Jun 12, 2010
1 parent 1c04850 commit 935e84b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions README.md
Expand Up @@ -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.
Expand All @@ -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*
Expand Down

0 comments on commit 935e84b

Please sign in to comment.