|
@@ 1430-1432 (lines=3) @@
|
| 1427 |
|
} |
| 1428 |
|
|
| 1429 |
|
if (Type::hasType($mapping['type']) && Type::getType($mapping['type'])->canRequireSQLConversion()) { |
| 1430 |
|
if (isset($mapping['id']) && true === $mapping['id']) { |
| 1431 |
|
throw MappingException::sqlConversionNotAllowedForIdentifiers($this->name, $mapping['fieldName'], $mapping['type']); |
| 1432 |
|
} |
| 1433 |
|
|
| 1434 |
|
$mapping['requireSQLConversion'] = true; |
| 1435 |
|
} |
|
@@ 1473-1475 (lines=3) @@
|
| 1470 |
|
$mapping['targetEntity'] = ltrim($mapping['targetEntity'], '\\'); |
| 1471 |
|
} |
| 1472 |
|
|
| 1473 |
|
if (($mapping['type'] & self::MANY_TO_ONE) > 0 && isset($mapping['orphanRemoval']) && $mapping['orphanRemoval']) { |
| 1474 |
|
throw MappingException::illegalOrphanRemoval($this->name, $mapping['fieldName']); |
| 1475 |
|
} |
| 1476 |
|
|
| 1477 |
|
// Complete id mapping |
| 1478 |
|
if (isset($mapping['id']) && true === $mapping['id']) { |
|
@@ 1526-1528 (lines=3) @@
|
| 1523 |
|
$mapping['isOwningSide'] = false; |
| 1524 |
|
} |
| 1525 |
|
|
| 1526 |
|
if (isset($mapping['id']) && true === $mapping['id'] && $mapping['type'] & self::TO_MANY) { |
| 1527 |
|
throw MappingException::illegalToManyIdentifierAssociation($this->name, $mapping['fieldName']); |
| 1528 |
|
} |
| 1529 |
|
|
| 1530 |
|
// Fetch mode. Default fetch mode to LAZY, if not set. |
| 1531 |
|
if ( ! isset($mapping['fetch'])) { |
|
@@ 1643-1645 (lines=3) @@
|
| 1640 |
|
unset($mapping['unique']); |
| 1641 |
|
} |
| 1642 |
|
|
| 1643 |
|
if (isset($mapping['id']) && $mapping['id'] === true && !$mapping['isOwningSide']) { |
| 1644 |
|
throw MappingException::illegalInverseIdentifierAssociation($this->name, $mapping['fieldName']); |
| 1645 |
|
} |
| 1646 |
|
|
| 1647 |
|
return $mapping; |
| 1648 |
|
} |