Mweb 965

Do not merge
you could change it to:

``` JS
var deferred = Q.defer(),
      columns = ['map_id'],
      where = {id: poiCategoryId};

dbCon
    .select(conn, poiCategoryConfig.dbTable, columns, where)
    .then(function (collection) {
         if (collection[0]) {
	     deferred.resolve(parseInt(collection[0].map_id, 10));
         } else {
	     deferred.reject();
         }
    });

return deferred.promise;

```