public function getVersion()
 {
     $result = parent::getVersion();
     if ($result === null) {
         $result = $this->pdo->findVersionById($this->versionId);
         $this->setVersion($result);
     }
     return $result;
 }
 private function persistDependency(PackageLink $packageLink)
 {
     $data = array($packageLink->getVersion()->getId(), $packageLink->getPackageVersion()->getId());
     $sql = "INSERT INTO " . $this->getTablePrefix() . "dependency\n                (version_id, package_version_id)\n                VALUES\n                (?, ?)";
     $stmt = $this->pdo->prepare($sql);
     $stmt->execute($data);
 }