| @@ 93-104 (lines=12) @@ | ||
| 90 | return; |
|
| 91 | } |
|
| 92 | ||
| 93 | if ($type instanceof ReferenceType) { |
|
| 94 | $metadata->mapManyToOne([ |
|
| 95 | 'fieldName' => $fieldName, |
|
| 96 | 'strategy' => 'hard', |
|
| 97 | ||
| 98 | 'nullable' => true, |
|
| 99 | 'cascade' => ClassMetadata::CASCADE_ALL, |
|
| 100 | 'multivalue' => $options['multivalue'], |
|
| 101 | ]); |
|
| 102 | ||
| 103 | return; |
|
| 104 | } |
|
| 105 | ||
| 106 | throw new \RuntimeException(sprintf( |
|
| 107 | 'Do not know how to map field of type "%s"', |
|
| @@ 134-144 (lines=11) @@ | ||
| 131 | return; |
|
| 132 | } |
|
| 133 | ||
| 134 | if ($innerType instanceof ReferenceType) { |
|
| 135 | $metadata->mapManyToMany([ |
|
| 136 | 'fieldName' => $fieldName, |
|
| 137 | 'strategy' => 'hard', |
|
| 138 | ||
| 139 | 'nullable' => true, |
|
| 140 | 'cascade' => ClassMetadata::CASCADE_ALL, |
|
| 141 | ]); |
|
| 142 | ||
| 143 | return; |
|
| 144 | } |
|
| 145 | ||
| 146 | // assume that other types are scalars... |
|
| 147 | $this->__invoke($fieldName, $collectionField, $metadata, [ |
|