Skip to content
This repository has been archived by the owner on Oct 14, 2022. It is now read-only.

Commit

Permalink
Optimization for relation key fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
intel352 committed Mar 6, 2012
1 parent 3b0f300 commit bf25fb0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ abstract class Document extends CModel {
/**
* Array of connections
*
* @var array \ext\activedocument\Connection
* @var \ext\activedocument\Connection[]
*/
public static $connections = array();
private static $_models = array();
Expand Down Expand Up @@ -321,8 +321,8 @@ public function getRelatedKeys($name) {
if ($relation->nested === true)
$pks = array_keys($pks);
return $pks;
} elseif($obj = $this->getRelated($name)) {
return $obj->getEncodedPk();
} else {
return self::stringify($this->getObject()->data[$name]);
}
return null;
}
Expand Down

0 comments on commit bf25fb0

Please sign in to comment.