Bravo3\Orm\Mappers\Metadata\Entity::setRelationships PHP Method

setRelationships() public method

Set relationships
public setRelationships ( array $relationships )
$relationships array
    public function setRelationships(array $relationships)
    {
        $this->relationships = $relationships;
        $this->property_map = null;
        return $this;
    }

Usage Example

 /**
  * Get the Entity metadata object
  *
  * @return Entity
  */
 public function getEntityMetadata()
 {
     $entity = new Entity($this->reflection_obj->name, $this->getTableName());
     $entity->setColumns($this->getColumns());
     $entity->setRelationships($this->getRelationships());
     $entity->setIndices($this->getIndices());
     $entity->setSortables($this->getSortables());
     return $entity;
 }