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(); }