// if you have an existing collection, it must first by synced.
// this will add random data for the `path` key for each doc.
Song.syncRandom(function (err, result) {
console.log(result.updated);
});
UserSchema.pre "save", function(next) {
var self = this;
UrlNameCounter.findOneAndUpdate({username: this.username}, {$inc: {count: 1}}, {upsert: yes},
function(err, counter) {
if (counter.count > 1) {
self.username = self.username + "-" + counter.count;
}
})
}