You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!$subMeta->hasField($fieldMapping['mappedBy'])) {
94
-
thrownewInvalidMappingException(sprintf('Unable to find reference integrity [%s] as mapped property in entity - %s', $fieldMapping['mappedBy'], $fieldMapping['targetDocument']));
93
+
if (!$subMeta->hasField($fieldMapping->mappedBy ?? $fieldMapping['mappedBy'])) {
94
+
thrownewInvalidMappingException(sprintf('Unable to find reference integrity [%s] as mapped property in entity - %s', $fieldMapping->mappedBy ?? $fieldMapping['mappedBy'],$fieldMapping->targetDocument ??$fieldMapping['targetDocument']));
if (!$subMeta->hasField($fieldMapping['mappedBy'])) {
120
-
thrownewInvalidMappingException(sprintf('Unable to find reference integrity [%s] as mapped property in entity - %s', $fieldMapping['mappedBy'], $fieldMapping['targetDocument']));
119
+
if (!$subMeta->hasField($fieldMapping->mappedBy ?? $fieldMapping['mappedBy'])) {
120
+
thrownewInvalidMappingException(sprintf('Unable to find reference integrity [%s] as mapped property in entity - %s', $fieldMapping->mappedBy ?? $fieldMapping['mappedBy'],$fieldMapping->targetDocument ??$fieldMapping['targetDocument']));
121
121
}
122
122
123
-
if (!$subMeta->isCollectionValuedReference($fieldMapping['mappedBy'])) {
124
-
thrownewInvalidMappingException(sprintf('Reference integrity [%s] mapped property in entity - %s should be a Reference Many', $fieldMapping['mappedBy'], $fieldMapping['targetDocument']));
123
+
if (!$subMeta->isCollectionValuedReference($fieldMapping->mappedBy ?? $fieldMapping['mappedBy'])) {
124
+
thrownewInvalidMappingException(sprintf('Reference integrity [%s] mapped property in entity - %s should be a Reference Many', $fieldMapping->mappedBy ?? $fieldMapping['mappedBy'],$fieldMapping->targetDocument ??$fieldMapping['targetDocument']));
if ($meta->isCollectionValuedReference($property)) {
130
130
foreach ($refDocas$refObj) {
@@ -143,10 +143,10 @@ public function preRemove(EventArgs $args)
143
143
break;
144
144
case Validator::RESTRICT:
145
145
if ($meta->isCollectionValuedReference($property) && $refDoc->count() > 0) {
146
-
thrownewReferenceIntegrityStrictException(sprintf("The reference integrity for the '%s' collection is restricted", $fieldMapping['targetDocument']));
146
+
thrownewReferenceIntegrityStrictException(sprintf("The reference integrity for the '%s' collection is restricted", $fieldMapping->targetDocument ?? $fieldMapping['targetDocument']));
147
147
}
148
148
if ($meta->isSingleValuedReference($property) && null !== $refDoc) {
149
-
thrownewReferenceIntegrityStrictException(sprintf("The reference integrity for the '%s' document is restricted", $fieldMapping['targetDocument']));
149
+
thrownewReferenceIntegrityStrictException(sprintf("The reference integrity for the '%s' document is restricted", $fieldMapping->targetDocument ?? $fieldMapping['targetDocument']));
0 commit comments