Storm\Core\Object\Domain::PersistedIdentifyingRelationship PHP Метод

PersistedIdentifyingRelationship() закрытый публичный Метод

NOTE: The child entity relationships will be persisted in the supplied unit of work.
final public PersistedIdentifyingRelationship ( $ParentEntity, object $ChildEntity, UnitOfWork $UnitOfWork ) : PersistedRelationship
$ChildEntity object
$UnitOfWork UnitOfWork
Результат PersistedRelationship The persisted relationship
    public final function PersistedIdentifyingRelationship($ParentEntity, $ChildEntity, UnitOfWork $UnitOfWork)
    {
        $ParentIdentity = $this->VerifyEntity(__METHOD__, $ParentEntity)->Identity($ParentEntity);
        $RelatedPersistenceData = $this->VerifyEntity(__METHOD__, $ChildEntity)->Persist($UnitOfWork, $ChildEntity);
        return new PersistedRelationship($ParentIdentity, null, $RelatedPersistenceData);
    }

Usage Example

Пример #1
0
 public function GetPersistedRelationship(Object\Domain $Domain, Object\UnitOfWork $UnitOfWork, $ParentEntity, $ChildEntity)
 {
     return $Domain->PersistedIdentifyingRelationship($ParentEntity, $ChildEntity, $UnitOfWork);
 }