LearnBoost/mongoose — pull request #1866 by fluidsonic (2014-01-09 11:40:25+00:00)
Title: Fix so that compound types can be used for _id and id properties

`Schema` inadvertently overwrites definitions of `_id` and `id` upon creation when using compound types. It tests for the existence of definitions `_id`/`id` using the full property path instead of existing definitions instead of just checking the tree root.

This change allows a model's `_id` property to load correctly from database documents when using a compound type.