/**
  * Queries for an object with the given $rid.
  *
  * If $lazy loading is used, all of this won't be executed unless the
  * returned Proxy object is called via __invoke, e.g.:
  *
  * <code>
  *   $lazyLoadedRecord = $manager->find('1:1', true);
  *
  *   $record = $lazyLoadedRecord();
  * </code>
  *
  * @param  string $rid
  * @param  string $fetchPlan
  *
  * @return Proxy|object
  * @throws OClassNotFoundException|OrientDBException
  */
 public function findByRid($rid, $fetchPlan = '*:0')
 {
     $class = $this->clusterMap->identifyClass($rid);
     $md = $this->metadataFactory->getMetadataForOClass($class);
     return $this->findWithPlan($md->name, $rid, $fetchPlan);
 }