@@ 2908-2915 (lines=8) @@ | ||
2905 | * |
|
2906 | * @throws MappingException |
|
2907 | */ |
|
2908 | public function getSingleAssociationJoinColumnName($fieldName) |
|
2909 | { |
|
2910 | if ( ! $this->isAssociationWithSingleJoinColumn($fieldName)) { |
|
2911 | throw MappingException::noSingleAssociationJoinColumnFound($this->name, $fieldName); |
|
2912 | } |
|
2913 | ||
2914 | return $this->associationMappings[$fieldName]['joinColumns'][0]['name']; |
|
2915 | } |
|
2916 | ||
2917 | /** |
|
2918 | * Returns the single association referenced join column name (if any). |
|
@@ 2926-2933 (lines=8) @@ | ||
2923 | * |
|
2924 | * @throws MappingException |
|
2925 | */ |
|
2926 | public function getSingleAssociationReferencedJoinColumnName($fieldName) |
|
2927 | { |
|
2928 | if ( ! $this->isAssociationWithSingleJoinColumn($fieldName)) { |
|
2929 | throw MappingException::noSingleAssociationJoinColumnFound($this->name, $fieldName); |
|
2930 | } |
|
2931 | ||
2932 | return $this->associationMappings[$fieldName]['joinColumns'][0]['referencedColumnName']; |
|
2933 | } |
|
2934 | ||
2935 | /** |
|
2936 | * Used to retrieve a fieldname for either field or association from a given column. |