 <p>I'm afraid <code>document.save()</code> only returns a populated version of <code>model</code>. You can see all files in <code>model.files</code> but then it would be up to you to figure out which was the last one.</p> <p>One alternative is to create the file before adding it to document. You should be able to do:</p> <pre><code>//... File.create({ name: req.param("name"), creator: req.param("userID"); }, function(err, file){ if (err) {return res.serverError(err);} var newFileId = file.id; document.files.add(file.id); document.save(function(err, model) { if (err) {return res.serverError(err);} // the Document modal console.log(model); // the last insert id console.log('last inserted id:', newFileId); res.send(1); }); }); //... </code></pre> <p>In this case <code>newFileId</code> will have the id you need. Performance wise it should be the same as internally waterline has to create the file in similar way.</p>