From 5c0767e043ce2ccc85b73fce6098d8545a7fd1de Mon Sep 17 00:00:00 2001 From: Stuart Hudson Date: Wed, 8 Jun 2011 14:50:35 +1000 Subject: [PATCH] README restyles --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dd13f8e..c962f1c 100644 --- a/README.md +++ b/README.md @@ -101,13 +101,15 @@ For example: }); This will create two methods: + - `getOrder(callback)` - this will asynchronously resolve the DBRef value in the `order` field + - `setOrder(value)` - this will cast the `value` (a model) to a DBRef value -In addition if the `cache` option is set, then the object resolved from teh DBRef value will be +In addition if the `cache` option is set, then the object resolved from teh `DBRef` value will be cached in a cache property (`$order` for the `order` field) and the getter method signature will be changed to `getOrder(callback, force)`. The additional, optional, parameter `force` -can be used to by pass any cached value. +can be used to bypass any cached value. This plugin can be installed on the mongoose instance or on individual schema, but the "owning" mongoose instance for the schema must always be specified during the installation.