|
@@ 142-155 (lines=14) @@
|
| 139 |
|
: $joinTable->getInverseJoinColumns() |
| 140 |
|
; |
| 141 |
|
|
| 142 |
|
foreach ($joinColumns as $joinColumn) { |
| 143 |
|
/** @var JoinColumnMetadata $joinColumn */ |
| 144 |
|
$quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 145 |
|
$referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 146 |
|
|
| 147 |
|
if (! $joinColumn->getType()) { |
| 148 |
|
$joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $sourceClass, $this->em)); |
| 149 |
|
} |
| 150 |
|
|
| 151 |
|
$conditions[] = sprintf('t.%s = ?', $quotedColumnName); |
| 152 |
|
$params[] = $identifier[$sourceClass->fieldNames[$referencedColumnName]]; |
| 153 |
|
$types[] = $joinColumn->getType(); |
| 154 |
|
} |
| 155 |
|
|
| 156 |
|
list($joinTargetEntitySQL, $filterSql) = $this->getFilterSql($association); |
| 157 |
|
|
| 158 |
|
if ($filterSql) { |
|
@@ 267-279 (lines=13) @@
|
| 264 |
|
$joinColumns = $association->getJoinTable()->getJoinColumns(); |
| 265 |
|
} |
| 266 |
|
|
| 267 |
|
foreach ($joinColumns as $joinColumn) { |
| 268 |
|
/** @var JoinColumnMetadata $joinColumn */ |
| 269 |
|
$quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 270 |
|
$referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 271 |
|
|
| 272 |
|
if (! $joinColumn->getType()) { |
| 273 |
|
$joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $ownerMetadata, $this->em)); |
| 274 |
|
} |
| 275 |
|
|
| 276 |
|
$whereClauses[] = sprintf('t.%s = ?', $quotedColumnName); |
| 277 |
|
$params[] = $identifier[$ownerMetadata->fieldNames[$referencedColumnName]]; |
| 278 |
|
$types[] = $joinColumn->getType(); |
| 279 |
|
} |
| 280 |
|
|
| 281 |
|
$parameters = $this->expandCriteriaParameters($criteria); |
| 282 |
|
|
|
@@ 696-708 (lines=13) @@
|
| 693 |
|
} |
| 694 |
|
} |
| 695 |
|
|
| 696 |
|
foreach ($inverseJoinColumns as $joinColumn) { |
| 697 |
|
/** @var JoinColumnMetadata $joinColumn */ |
| 698 |
|
$quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 699 |
|
$referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 700 |
|
|
| 701 |
|
if (! $joinColumn->getType()) { |
| 702 |
|
$joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $sourceClass, $this->em)); |
| 703 |
|
} |
| 704 |
|
|
| 705 |
|
$whereClauses[] = sprintf('t.%s = ?', $quotedColumnName); |
| 706 |
|
$params[] = $identifier[$sourceClass->fieldNames[$joinColumn->getReferencedColumnName()]]; |
| 707 |
|
$types[] = $joinColumn->getType(); |
| 708 |
|
} |
| 709 |
|
|
| 710 |
|
if (! $joinNeeded) { |
| 711 |
|
foreach ($joinColumns as $joinColumn) { |
|
@@ 711-723 (lines=13) @@
|
| 708 |
|
} |
| 709 |
|
|
| 710 |
|
if (! $joinNeeded) { |
| 711 |
|
foreach ($joinColumns as $joinColumn) { |
| 712 |
|
/** @var JoinColumnMetadata $joinColumn */ |
| 713 |
|
$quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 714 |
|
$referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 715 |
|
|
| 716 |
|
if (! $joinColumn->getType()) { |
| 717 |
|
$joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
| 718 |
|
} |
| 719 |
|
|
| 720 |
|
$whereClauses[] = sprintf('t.%s = ?', $quotedColumnName); |
| 721 |
|
$params[] = $key; |
| 722 |
|
$types[] = $joinColumn->getType(); |
| 723 |
|
} |
| 724 |
|
} |
| 725 |
|
|
| 726 |
|
if ($addFilters) { |
|
@@ 775-788 (lines=14) @@
|
| 772 |
|
$params = []; |
| 773 |
|
$types = []; |
| 774 |
|
|
| 775 |
|
foreach ($joinTable->getJoinColumns() as $joinColumn) { |
| 776 |
|
/** @var JoinColumnMetadata $joinColumn */ |
| 777 |
|
$quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 778 |
|
$referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 779 |
|
|
| 780 |
|
if (! $joinColumn->getType()) { |
| 781 |
|
$joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $sourceClass, $this->em)); |
| 782 |
|
} |
| 783 |
|
|
| 784 |
|
$whereClauses[] = ($addFilters ? 't.' : '') . $quotedColumnName . ' = ?'; |
| 785 |
|
$params[] = $sourceIdentifier[$sourceClass->fieldNames[$referencedColumnName]]; |
| 786 |
|
$types[] = $joinColumn->getType(); |
| 787 |
|
} |
| 788 |
|
|
| 789 |
|
foreach ($joinTable->getInverseJoinColumns() as $joinColumn) { |
| 790 |
|
/** @var JoinColumnMetadata $joinColumn */ |
| 791 |
|
$quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
|
@@ 789-802 (lines=14) @@
|
| 786 |
|
$types[] = $joinColumn->getType(); |
| 787 |
|
} |
| 788 |
|
|
| 789 |
|
foreach ($joinTable->getInverseJoinColumns() as $joinColumn) { |
| 790 |
|
/** @var JoinColumnMetadata $joinColumn */ |
| 791 |
|
$quotedColumnName = $this->platform->quoteIdentifier($joinColumn->getColumnName()); |
| 792 |
|
$referencedColumnName = $joinColumn->getReferencedColumnName(); |
| 793 |
|
|
| 794 |
|
if (! $joinColumn->getType()) { |
| 795 |
|
$joinColumn->setType(PersisterHelper::getTypeOfColumn($referencedColumnName, $targetClass, $this->em)); |
| 796 |
|
} |
| 797 |
|
|
| 798 |
|
$whereClauses[] = ($addFilters ? 't.' : '') . $quotedColumnName . ' = ?'; |
| 799 |
|
$params[] = $targetIdentifier[$targetClass->fieldNames[$referencedColumnName]]; |
| 800 |
|
$types[] = $joinColumn->getType(); |
| 801 |
|
} |
| 802 |
|
|
| 803 |
|
if ($addFilters) { |
| 804 |
|
$quotedJoinTable .= ' t'; |
| 805 |
|
|