+_ = require 'underscore'
 neo4j = require "neo4j"
 {race} = require 'sinkrow'
 {Base, ObjectId, race} = require 'bongo'

      }
      collectObjects({klass:klass, selector:selector, modelName:modelName})

  runQuery:(query, options, callback)->
    {startDate, client} = options
    if options.group?
      {groupName, groupId} = options.group

    @db.query query, {}, (err, results)=>
      tempRes = []
      if err 
        callback err
      else if results.length is 0 then callback null, []
      else
        collectRelations = race (i, res, fin)=>

              callback err
              fin()
            else
                if relatedResult.reply?
                  {collections, wantedOrder} = @getIdsFromAResultSet relatedResult.reply
                  @fetchObjectsFromMongo collections, wantedOrder, (err, dbObjects)->
                    res.replies.push dbObj for dbObj in dbObjects
                    tempRes.push res
                    fin()
                else
