Created
October 28, 2014 02:52
-
-
Save Streemo/09fd2456fc1095390c32 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var bobId = Meteor.users.insert({ | |
profile: {name: 'Bob Jones'} | |
}); | |
var bob = Meteor.users.findOne({_id: bobId}); | |
for (var i = 0; i < 45; i++) { Posts.insert({ | |
title: 'Test post #' + i, | |
author: bob.profile.name, | |
userId: bob._id, | |
url: 'http://google.com/?q=test-' + i, submitted: now - i * 3600 * 1000, commentsCount: 0 | |
}); | |
} | |
//all of the documents created in this file have _id as string type when accessed in mongo shell. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment