protected function parseAssociation($propertyName, \ReflectionProperty $reflectionProperty, AnnotationBag $propertyAnnotations) {
		if ($propertyAnnotations->has('OneToOne')) {
			$association = new OneToOne($propertyName, $reflectionProperty, $propertyAnnotations);
			
			if ($association->isForeignKey()) {
				$attribute = $association->getAttribute()->getArgument();
				$this->foreignKeys[$attribute] = $propertyName;
			}
			elseif ($association->isCascade())
				$this->references[] = $propertyName;
		}
		elseif ($propertyAnnotations->has('OneToMany')) {
			$association = new OneToMany($propertyName, $reflectionProperty, $propertyAnnotations);
			
			if ($association->isCascade())
				$this->references[] = $propertyName;
		}
		elseif ($propertyAnnotations->has('ManyToOne')) {
			$association = new ManyToOne($propertyName, $reflectionProperty, $propertyAnnotations);
			$attribute = $association->getAttribute()->getArgument();
			$this->foreignKeys[$attribute] = $propertyName;
		}
		elseif ($propertyAnnotations->has('ManyToMany')) {
			$association = new ManyToMany($propertyName, $reflectionProperty, $propertyAnnotations);
			
			if ($association->isCascade())
				$this->references[] = $propertyName;
		}
		
		$this->associations[$propertyName] = $association;
	}
protected function parseAssociation($propertyName, \ReflectionProperty $reflectionProperty, AnnotationBag $propertyAnnotations) {
		if ($propertyAnnotations->has('OneToOne')) {
			$association = new OneToOne($propertyName, $reflectionProperty, $propertyAnnotations);
			
			if ($association->isForeignKey()) {
				$attribute = $association->getAttribute()->getArgument();
				$this->foreignKeys[$attribute] = $propertyName;
			}
			elseif ($association->isCascade())
				$this->references[] = $propertyName;
		}
		elseif ($propertyAnnotations->has('OneToMany')) {
			$association = new OneToMany($propertyName, $reflectionProperty, $propertyAnnotations);
			
			if ($association->isCascade())
				$this->references[] = $propertyName;
		}
		elseif ($propertyAnnotations->has('ManyToOne')) {
			$association = new ManyToOne($propertyName, $reflectionProperty, $propertyAnnotations);
			$attribute = $association->getAttribute()->getArgument();
			$this->foreignKeys[$attribute] = $propertyName;
		}
		elseif ($propertyAnnotations->has('ManyToMany')) {
			$association = new ManyToMany($propertyName, $reflectionProperty, $propertyAnnotations);
			
			if ($association->isCascade())
				$this->references[] = $propertyName;
		}
		
		$this->associations[$propertyName] = $association;
	}
protected function parseAssociation ( $ propertyName , \ ReflectionProperty $ reflectionProperty , AnnotationBag $ propertyAnnotations ) { if ( $ propertyAnnotations -> has ( 'OneToOne' ) ) { $ association = new OneToOne ( $ propertyName , $ reflectionProperty , $ propertyAnnotations ) ; if ( $ association -> isForeignKey ( ) ) { $ attribute = $ association -> getAttribute ( ) -> getArgument ( ) ; $ this -> foreignKeys [ $ attribute ] = $ propertyName ; } elseif ( $ association -> isCascade ( ) ) $ this -> references [ ] = $ propertyName ; } elseif ( $ propertyAnnotations -> has ( 'OneToMany' ) ) { $ association = new OneToMany ( $ propertyName , $ reflectionProperty , $ propertyAnnotations ) ; if ( $ association -> isCascade ( ) ) $ this -> references [ ] = $ propertyName ; } elseif ( $ propertyAnnotations -> has ( 'ManyToOne' ) ) { $ association = new ManyToOne ( $ propertyName , $ reflectionProperty , $ propertyAnnotations ) ; $ attribute = $ association -> getAttribute ( ) -> getArgument ( ) ; $ this -> foreignKeys [ $ attribute ] = $ propertyName ; } elseif ( $ propertyAnnotations -> has ( 'ManyToMany' ) ) { $ association = new ManyToMany ( $ propertyName , $ reflectionProperty , $ propertyAnnotations ) ; if ( $ association -> isCascade ( ) ) $ this -> references [ ] = $ propertyName ; } $ this -> associations [ $ propertyName ] = $ association ; }
Parses an entity association
@param string $propertyName
@param \ReflectionProperty $reflectionProperty
@param \Omocha\AnnotationBag $propertyAnnotations
Parses an entity association