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