Skip to content

Commit

Permalink
Add explanation of can.set.dotNotation and link to MongoDB explanatio…
Browse files Browse the repository at this point in the history
…n of dot notation.
  • Loading branch information
Nils Lundquist committed Apr 14, 2017
1 parent 521c609 commit 455019f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/guides/place-my-order.md
Expand Up @@ -387,7 +387,10 @@ We also need to specify that the restaurant list can be filtered to restaurants
@sourceref ../../guides/place-my-order/steps/create-test/restaurants_model.js
@highlight 15-16

Above we use 'set.props.dotNotation' since our queries for these nested properties will be in the MongoDB-style 'dot notation' format required by the backend.
Above we use `set.props.dotNotation` since our queries for these nested properties will be in the [MongoDB-style 'dot notation'](https://docs.mongodb.com/v2.2/reference/glossary/#term-dot-notation) format required by the backend.

For example, MongoDB expects a query parameter for restaurants in a specific state to look like `{'address.state':'IL'}` and the libraries underneath supermodel expect it to look like `{address:{state: 'IL'}}`. `can.set.dotNotation` allows supermodel to make comparisons these two formats.


### Test the connection

Expand Down

0 comments on commit 455019f

Please sign in to comment.