LearnBoost/mongoose — Issue #768: Get last inserted ID of embedded document
Author: niftylettuce
Created: 2012-03-10 01:30:24+00:00
State: open

Without having to set the embedded document schema, there is no current way other than using `embDoc.length - 1` to get the `._id` of the last inserted embedded document.

And since you cannot call `new EmbeddedDocument()` on an embedded document schema, without exposing it (e.g. `db.model('EmbeddedDocument', EmbeddedDocSchema);` -- there is no current way to do this cleanly per se.