|
@@ 174-180 (lines=7) @@
|
| 171 |
|
if ($assoc['isOwningSide']) { |
| 172 |
|
if ($assoc['type'] == ClassMetadataInfo::MANY_TO_MANY) { |
| 173 |
|
$identifierColumns = $class->getIdentifierColumnNames(); |
| 174 |
|
foreach ($assoc['joinTable']['joinColumns'] as $joinColumn) { |
| 175 |
|
if (!in_array($joinColumn['referencedColumnName'], $identifierColumns)) { |
| 176 |
|
$ce[] = "The referenced column name '" . $joinColumn['referencedColumnName'] . "' " . |
| 177 |
|
"has to be a primary key column on the target entity class '".$class->name."'."; |
| 178 |
|
break; |
| 179 |
|
} |
| 180 |
|
} |
| 181 |
|
|
| 182 |
|
$identifierColumns = $targetMetadata->getIdentifierColumnNames(); |
| 183 |
|
foreach ($assoc['joinTable']['inverseJoinColumns'] as $inverseJoinColumn) { |
|
@@ 183-189 (lines=7) @@
|
| 180 |
|
} |
| 181 |
|
|
| 182 |
|
$identifierColumns = $targetMetadata->getIdentifierColumnNames(); |
| 183 |
|
foreach ($assoc['joinTable']['inverseJoinColumns'] as $inverseJoinColumn) { |
| 184 |
|
if (!in_array($inverseJoinColumn['referencedColumnName'], $identifierColumns)) { |
| 185 |
|
$ce[] = "The referenced column name '" . $joinColumn['referencedColumnName'] . "' " . |
| 186 |
|
"has to be a primary key column on the target entity class '".$targetMetadata->name."'."; |
| 187 |
|
break; |
| 188 |
|
} |
| 189 |
|
} |
| 190 |
|
|
| 191 |
|
if (count($targetMetadata->getIdentifierColumnNames()) != count($assoc['joinTable']['inverseJoinColumns'])) { |
| 192 |
|
$ce[] = "The inverse join columns of the many-to-many table '" . $assoc['joinTable']['name'] . "' " . |