Reputation: 11445
This is the data
{
"username": "runrun",
"channel": "all",
"expire": NumberLong("1308183908743"),
"_id": ObjectId("4df93f54e07324af47000001")
}
This is the code I used to use to remove a record
db.collection('seesion',function(err, collection){
collection.remove({
"expire": {"$lte": Date.now()}
},function(err, removed){
console.log(removed);
});
});
I want to delete the session which has been expired. Problem is, the code doesn't work, maybe there is something to do with numberLong ?
Upvotes: 11
Views: 12855