src/app/n2n/impl/persistence/orm/property/hangar/relation/OneToOnePropDef.php
public function createMagCollection(PropSourceDef $propSourceDef = null): MagCollection {
		$magCollection = new OrmRelationMagCollection($this->huoContext->getEntityModelManager(), true, true);
		
		if (null !== $propSourceDef) {

			if ($propSourceDef->hasPhpPropertyAnno(AnnoOneToOne::class)) {
				$phpAnnotation = $propSourceDef->getPhpPropertyAnno(AnnoOneToOne::class);
				
				$localName = OrmRelationMagCollection::determineLocalName($phpAnnotation->getPhpAnnoParam(1));
				$magCollection->setTargetEntityClasName($propSourceDef->determineTypeName($localName) ?? $localName);
				
				if ($phpAnnotation->hasPhpAnnoParam(2)) {
					$magCollection->setMappedBy($phpAnnotation->getPhpAnnoParam(2)->getStringValue());
				}
				
				if ($phpAnnotation->hasPhpAnnoParam(3)) {
					$magCollection->setCascadeTypes(
							OrmRelationMagCollection::determineCascadeTypes($phpAnnotation->getPhpAnnoParam(3)));
				}
				
				if ($phpAnnotation->hasPhpAnnoParam(4)) {
					$magCollection->setFetchType(
							OrmRelationMagCollection::determineFetchType($phpAnnotation->getPhpAnnoParam(4)));
				}
				
				if ($phpAnnotation->hasPhpAnnoParam(5)) {
					$magCollection->setOrphanRemoval($phpAnnotation->getPhpAnnoParam(5)->getBoolValue());
				}
			}
		}
		
		return $magCollection;
	}
public function createMagCollection(PropSourceDef $propSourceDef = null): MagCollection {
		$magCollection = new OrmRelationMagCollection($this->huoContext->getEntityModelManager(), true, true);
		
		if (null !== $propSourceDef) {

			if ($propSourceDef->hasPhpPropertyAnno(AnnoOneToOne::class)) {
				$phpAnnotation = $propSourceDef->getPhpPropertyAnno(AnnoOneToOne::class);
				
				$localName = OrmRelationMagCollection::determineLocalName($phpAnnotation->getPhpAnnoParam(1));
				$magCollection->setTargetEntityClasName($propSourceDef->determineTypeName($localName) ?? $localName);
				
				if ($phpAnnotation->hasPhpAnnoParam(2)) {
					$magCollection->setMappedBy($phpAnnotation->getPhpAnnoParam(2)->getStringValue());
				}
				
				if ($phpAnnotation->hasPhpAnnoParam(3)) {
					$magCollection->setCascadeTypes(
							OrmRelationMagCollection::determineCascadeTypes($phpAnnotation->getPhpAnnoParam(3)));
				}
				
				if ($phpAnnotation->hasPhpAnnoParam(4)) {
					$magCollection->setFetchType(
							OrmRelationMagCollection::determineFetchType($phpAnnotation->getPhpAnnoParam(4)));
				}
				
				if ($phpAnnotation->hasPhpAnnoParam(5)) {
					$magCollection->setOrphanRemoval($phpAnnotation->getPhpAnnoParam(5)->getBoolValue());
				}
			}
		}
		
		return $magCollection;
	}
{@inheritDoc}
@see \hangar\api\HangarPropDef::createMagCollection()
@return MagCollection