protected function tryToGetJoinColumnNameOfMappedBy($annotation){
        $annotation = $this->tryToGetJoinColumnAnnotationOfMappedBy($annotation);
        if ($annotation !== null) {
            if ($annotation instanceof JoinColumn) {
                return $annotation->name;
            } else if ($annotation instanceof JoinColumns) {
                if (count($annotation->value) > 1) {
                    throw new \Exception('Multiple foreign key is not supported');
                }
                return $annotation->value[0]->name;
            }
        }
        return '';
    }
protected function tryToGetJoinColumnNameOfMappedBy($annotation){
        $annotation = $this->tryToGetJoinColumnAnnotationOfMappedBy($annotation);
        if ($annotation !== null) {
            if ($annotation instanceof JoinColumn) {
                return $annotation->name;
            } else if ($annotation instanceof JoinColumns) {
                if (count($annotation->value) > 1) {
                    throw new \Exception('Multiple foreign key is not supported');
                }
                return $annotation->value[0]->name;
            }
        }
        return '';
    }
protected function tryToGetJoinColumnNameOfMappedBy ( $ annotation ) { $ annotation = $ this -> tryToGetJoinColumnAnnotationOfMappedBy ( $ annotation ) ; if ( $ annotation !== null ) { if ( $ annotation instanceof JoinColumn ) { return $ annotation -> name ; } else if ( $ annotation instanceof JoinColumns ) { if ( count ( $ annotation -> value ) > 1 ) { throw new \ Exception ( 'Multiple foreign key is not supported' ) ; } return $ annotation -> value [ 0 ] -> name ; } } return '' ; }
Get the join column name.

@param OneToMany $annotation
@throws \Exception
@return string
Get the join column name .