| @@ 145-159 (lines=15) @@ | ||
| 142 | /** |
|
| 143 | * {@inheritdoc} |
|
| 144 | */ |
|
| 145 | public function joinTableName($sourceEntity, $targetEntity, $propertyName = null) |
|
| 146 | { |
|
| 147 | switch ($this->concatenation) { |
|
| 148 | case self::UCFIRST: |
|
| 149 | return $this->classToTableName($sourceEntity) . ucfirst($this->classToTableName($targetEntity)); |
|
| 150 | break; |
|
| 151 | case self::NOTHING: |
|
| 152 | return $this->classToTableName($sourceEntity) . $this->classToTableName($targetEntity); |
|
| 153 | break; |
|
| 154 | case self::UNDERSCORE: // FALL TROUGH |
|
| 155 | default: |
|
| 156 | return $this->classToTableName($sourceEntity) . '_' . $this->classToTableName($targetEntity); |
|
| 157 | break; |
|
| 158 | } |
|
| 159 | } |
|
| 160 | ||
| 161 | /** |
|
| 162 | * {@inheritdoc} |
|
| @@ 164-178 (lines=15) @@ | ||
| 161 | /** |
|
| 162 | * {@inheritdoc} |
|
| 163 | */ |
|
| 164 | public function joinKeyColumnName($entityName, $referencedColumnName = null) |
|
| 165 | { |
|
| 166 | switch ($this->concatenation) { |
|
| 167 | case self::UCFIRST: |
|
| 168 | return $this->classToTableName($entityName) . ucfirst(($referencedColumnName ?: $this->referenceColumnName())); |
|
| 169 | break; |
|
| 170 | case self::NOTHING: |
|
| 171 | return $this->classToTableName($entityName) . ($referencedColumnName ?: $this->referenceColumnName()); |
|
| 172 | break; |
|
| 173 | case self::UNDERSCORE: // FALL TROUGH |
|
| 174 | default: |
|
| 175 | return $this->classToTableName($entityName) . '_' . ($referencedColumnName ?: $this->referenceColumnName()); |
|
| 176 | break; |
|
| 177 | } |
|
| 178 | } |
|
| 179 | } |
|
| 180 | ||