StartupWeekend/mongoose — pull request #1 by TheDahv (2013-04-05 20:55:01+00:00)
Title: Handle null _id in a sub-document

In an instance where one of the subdocuments in an embedded array
has a null value in the _id field, functions that rely on loop
comparisons will fail since they don't check for the field's existence
before casting to a comparable representation of that value.

This commit fixes how document `equals` works, as well as ensures
that looping comparators in `id` work as well.