LearnBoost/mongoose — pull request #806 by richtera (2012-03-31 00:32:56+00:00)
Title: Add fixes for ref support. Cast documents to their embedded or sub types...

This is the other pull which the rest of the code. When using documents with references (i.e. related documents populated using populate()) it was not treating those correctly when trying to update of query them. For this part I was unsure how to construct valid tests though so need some help with that part.