View difference between Paste ID: 2r70aD8T and Yd2qLcYM
SHOW: | | - or go back to the newest paste.
1
val notificationDbObject: Option[DBObject] = notificationsColl.findOne(MongoDBObject("gnid" -> gnid.get))
2-
if (notificationDbObject.nonEmpty) {
2+
notificationDbObject.map{x => List(MongoDBObject("$match" -> MongoDBObject("_id" -> MongoDBObject("$lte" -> x.as[ObjectId]("_id")))}.getOrElse{List.empty}