Doctrine\ODM\OrientDB\Repository::find PHP Method

find() public method

Finds an object by its primary key / identifier.
public find ( string $rid, $fetchPlan = '*:0' ) : object
$rid string The identifier.
return object The object.
    public function find($rid, $fetchPlan = '*:0')
    {
        $document = $this->getManager()->find($rid, $fetchPlan);
        if (!$document) {
            return null;
        }
        if ($this->contains($document)) {
            return $document;
        }
        throw new Exception("You are asking to find record {$rid} through the repository {$this->getClassName()} " . "but the document belongs to another repository (" . get_class($document) . ")");
    }