LearnBoost/mongoose — pull request #732 by vedmalex (2012-02-13 12:12:11+00:00)
Title: make object ref by not only _id(id) property

Сodename StringRef
The basic idea: make it possible links between two objects by any field, not only _id, or id, but any available field of the Class.
pro:
for refenrencing object now we can use also unique key: username, email and etc.
cons:
referenced key must be also StringRef
implements new Type

all tests now passes.
i use the same tests as for model.ref with small changes.
Please review it