original_string: public function getLogEntriesQueryRoot($entity, $rootVersion = null)
      {
          $wrapped = new EntityWrapper($entity, $this->_em);
          $objectClass = $wrapped->getMetadata()->name;
          $meta = $this->getClassMetadata();
          $dql = "SELECT log FROM {$meta->name} log";
          $dql .= " WHERE log.objectId = :objectId";
          $dql .= " AND log.objectClass = :objectClass";
          $dql .= " AND log.rootVersion <= :rootVersion";
          $dql .= " ORDER BY log.version DESC";
  
          $objectId = $wrapped->getIdentifier();
          $q = $this->_em->createQuery($dql);
          $q->setParameters(compact('objectId', 'objectClass', 'rootVersion'));
  
          return $q;
      }
code: public function getLogEntriesQueryRoot($entity, $rootVersion = null)
      {
          $wrapped = new EntityWrapper($entity, $this->_em);
          $objectClass = $wrapped->getMetadata()->name;
          $meta = $this->getClassMetadata();
          $dql = "SELECT log FROM {$meta->name} log";
          $dql .= " WHERE log.objectId = :objectId";
          $dql .= " AND log.objectClass = :objectClass";
          $dql .= " AND log.rootVersion <= :rootVersion";
          $dql .= " ORDER BY log.version DESC";
  
          $objectId = $wrapped->getIdentifier();
          $q = $this->_em->createQuery($dql);
          $q->setParameters(compact('objectId', 'objectClass', 'rootVersion'));
  
          return $q;
      }
code_tokens: public function getLogEntriesQueryRoot ( $ entity , $ rootVersion = null ) { $ wrapped = new EntityWrapper ( $ entity , $ this -> _em ) ; $ objectClass = $ wrapped -> getMetadata ( ) -> name ; $ meta = $ this -> getClassMetadata ( ) ; $ dql = "SELECT log FROM {$meta->name} log" ; $ dql .= " WHERE log.objectId = :objectId" ; $ dql .= " AND log.objectClass = :objectClass" ; $ dql .= " AND log.rootVersion <= :rootVersion" ; $ dql .= " ORDER BY log.version DESC" ; $ objectId = $ wrapped -> getIdentifier ( ) ; $ q = $ this -> _em -> createQuery ( $ dql ) ; $ q -> setParameters ( compact ( 'objectId' , 'objectClass' , 'rootVersion' ) ) ; return $ q ; }
docstring: Get the query for loading of log entries
  
  @param object  $entity
  @param integer $rootVersion
  
  @return Query
docstring_tokens: Get the query for loading of log entries