Beispiel #1
0
 /**
  * {@inheritdoc}
  */
 protected function createSelector()
 {
     $selector = parent::createSelector();
     if (isset($this->definition[RecordEntity::WHERE])) {
         $selector->where($this->mountAlias($selector->primaryAlias(), $this->definition[RecordEntity::WHERE]));
     }
     return $selector;
 }
Beispiel #2
0
 /**
  * {@inheritdoc}
  *
  * @throws RelationException
  */
 protected function createSelector()
 {
     if (empty($this->parent->getField($this->definition[RecordEntity::INNER_KEY], false))) {
         throw new RelationException("Belongs-to selector can not be constructed when inner key (" . $this->definition[RecordEntity::INNER_KEY] . ") is null.");
     }
     return parent::createSelector();
 }