Permalink
Browse files

document caveat on getters regarding Model.update()

  • Loading branch information...
1 parent 66d8d15 commit 393e5cf2471afe5d89afb62796816bf77b5ca006 @thatmarvin thatmarvin committed with aheckmann Mar 26, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 docs/getters-setters.md
View
@@ -47,6 +47,9 @@ Suppose you are storing credit card numbers and you want to hide everything exce
console.log(found.creditCardNumber); // '****-****-****-1234'
});
+
+**Important!** Note that getters only works when creating or modifying `Document` instances; it will not be invoked when `Document` instances are not involved like in `Model.update()`.
+
## Summary
Setters are intended to modify the underlying raw data. Getters are intended to transform (but not modify at the raw data level) the underlying raw data into something that the user expects to see. They are both defined in the `Schema` definition.

0 comments on commit 393e5cf

Please sign in to comment.