コード例 #1
0
 /**
  * {@inheritdoc}
  */
 protected function clarifyDefinition()
 {
     parent::clarifyDefinition();
     if (empty($this->definition[RecordEntity::PIVOT_TABLE])) {
         $this->definition[RecordEntity::PIVOT_TABLE] = $this->getPivotTable();
     }
     if (!$this->isSameDatabase()) {
         throw new RelationSchemaException("Many-to-Many relation can create relations ({$this}) only to entities from same database.");
     }
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 protected function clarifyDefinition()
 {
     parent::clarifyDefinition();
     if (!$this->isSameDatabase()) {
         throw new RelationSchemaException("Morphed relations ({$this}) can only link entities from the same database.");
     }
 }