briankircho/mongoose-schema-extend — pull request #15 by rodriguise (2013-10-17 23:24:27+00:00)
Title: Update index.js

fixing to test for issue where db.models is undefined, fallback to original model lookup. It seems that db.models is only created when the connection is explicitly created.