|
@@ 1699-1707 (lines=9) @@
|
| 1696 |
|
$selfReferencingEntityWithoutJoinColumns = $mapping['sourceEntity'] == $mapping['targetEntity'] |
| 1697 |
|
&& (! (isset($mapping['joinTable']['joinColumns']) || isset($mapping['joinTable']['inverseJoinColumns']))); |
| 1698 |
|
|
| 1699 |
|
if ( ! isset($mapping['joinTable']['joinColumns'])) { |
| 1700 |
|
$mapping['joinTable']['joinColumns'] = [ |
| 1701 |
|
[ |
| 1702 |
|
'name' => $this->namingStrategy->joinKeyColumnName($mapping['sourceEntity'], $selfReferencingEntityWithoutJoinColumns ? 'source' : null), |
| 1703 |
|
'referencedColumnName' => $this->namingStrategy->referenceColumnName(), |
| 1704 |
|
'onDelete' => 'CASCADE' |
| 1705 |
|
] |
| 1706 |
|
]; |
| 1707 |
|
} |
| 1708 |
|
|
| 1709 |
|
if ( ! isset($mapping['joinTable']['inverseJoinColumns'])) { |
| 1710 |
|
$mapping['joinTable']['inverseJoinColumns'] = [ |
|
@@ 1709-1717 (lines=9) @@
|
| 1706 |
|
]; |
| 1707 |
|
} |
| 1708 |
|
|
| 1709 |
|
if ( ! isset($mapping['joinTable']['inverseJoinColumns'])) { |
| 1710 |
|
$mapping['joinTable']['inverseJoinColumns'] = [ |
| 1711 |
|
[ |
| 1712 |
|
'name' => $this->namingStrategy->joinKeyColumnName($mapping['targetEntity'], $selfReferencingEntityWithoutJoinColumns ? 'target' : null), |
| 1713 |
|
'referencedColumnName' => $this->namingStrategy->referenceColumnName(), |
| 1714 |
|
'onDelete' => 'CASCADE' |
| 1715 |
|
] |
| 1716 |
|
]; |
| 1717 |
|
} |
| 1718 |
|
|
| 1719 |
|
$mapping['joinTableColumns'] = []; |
| 1720 |
|
|