|
@@ 98-108 (lines=11) @@
|
| 95 |
|
} |
| 96 |
|
|
| 97 |
|
|
| 98 |
|
if (isset($element['referenceOne'])) { |
| 99 |
|
foreach ($element['referenceOne'] AS $field => $referenceOneElement) { |
| 100 |
|
$class->mapManyToOne(array( |
| 101 |
|
'cascade' => (isset($referenceOneElement['cascade'])) ? $this->getCascadeMode($referenceOneElement['cascade']) : 0, |
| 102 |
|
'targetDocument' => (string)$referenceOneElement['targetDocument'], |
| 103 |
|
'fieldName' => $field, |
| 104 |
|
'jsonName' => (isset($referenceOneElement['jsonName'])) ? (string)$referenceOneElement['jsonName'] : null, |
| 105 |
|
'indexed' => (isset($referenceOneElement['index'])) ? (bool)$referenceOneElement['index'] : false, |
| 106 |
|
)); |
| 107 |
|
} |
| 108 |
|
} |
| 109 |
|
|
| 110 |
|
if (isset($element['referenceMany'])) { |
| 111 |
|
foreach ($element['referenceMany'] AS $field => $referenceManyElement) { |
|
@@ 110-120 (lines=11) @@
|
| 107 |
|
} |
| 108 |
|
} |
| 109 |
|
|
| 110 |
|
if (isset($element['referenceMany'])) { |
| 111 |
|
foreach ($element['referenceMany'] AS $field => $referenceManyElement) { |
| 112 |
|
$class->mapManyToMany(array( |
| 113 |
|
'cascade' => (isset($referenceManyElement['cascade'])) ? $this->getCascadeMode($referenceManyElement['cascade']) : 0, |
| 114 |
|
'targetDocument' => (string)$referenceManyElement['targetDocument'], |
| 115 |
|
'fieldName' => $field, |
| 116 |
|
'jsonName' => (isset($referenceManyElement['jsonName'])) ? (string)$referenceManyElement['jsonName'] : null, |
| 117 |
|
'mappedBy' => (isset($referenceManyElement['mappedBy'])) ? (string)$referenceManyElement['mappedBy'] : null, |
| 118 |
|
)); |
| 119 |
|
} |
| 120 |
|
} |
| 121 |
|
|
| 122 |
|
if (isset($element['attachments'])) { |
| 123 |
|
$class->mapAttachments($element['attachments']); |