protected function buildBaseWhoAlsoQuery($type, $objRequest) { $vertex = new Vertex(); $query = $vertex->findBy($objRequest->product->label, $objRequest->product->properties); $queryCategory = ').'; if (isset($objRequest->category) && strlen($objRequest->category)) { $queryCategory = "filter(out('belong').has('id',ID_CATEGORY))."; $this->connection->message->bindValue('ID_CATEGORY', "{$objRequest->category}"); } $limit = isset($objRequest->limit) ? (int) $objRequest->limit : self::DEFAULT_LIMIT; $query .= ".as('p').in('view').\n out('view').where(neq('p')).\n {$queryCategory}\n groupCount().by('id').order(local).by(valueDecr).limit(local,{$limit});"; return $query; }