__construct() public method

public __construct ( Storm\Core\Object\IEntityProperty $EntityProperty, Storm\Core\Relational\IToOneRelation $ToOneRelation )
$EntityProperty Storm\Core\Object\IEntityProperty
$ToOneRelation Storm\Core\Relational\IToOneRelation
 public function __construct(Object\IEntityProperty $EntityProperty, Relational\IToOneRelation $ToOneRelation)
 {
     if ($EntityProperty->IsOptional()) {
         throw MappingException::OptionalEntityInLazyContext($ToOneRelation);
     }
     parent::__construct($EntityProperty, $ToOneRelation);
 }
 public function __construct(Object\IEntityProperty $EntityProperty, Relational\IToOneRelation $ToOneRelation)
 {
     parent::__construct($EntityProperty, $ToOneRelation);
     $this->WillJoinRows = !$this->GetEntityProperty()->IsOptional();
 }