File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/Magento/FunctionalTestingFramework/DataGenerator/Persist Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -245,10 +245,11 @@ private function getDependentEntitiesOfType($type)
245245 private function resolveOperationObjectAndEntityData ($ entityObject , $ operationElementValue )
246246 {
247247 if ($ operationElementValue != $ entityObject ->getType ()) {
248- // if we have a mismatch attempt to retrieve linked data and return just the first linkage
248+ // if we have a mismatch attempt to retrieve linked data and return just the last linkage
249+ // this enables overwriting of required entity fields
249250 $ linkName = $ entityObject ->getLinkedEntitiesOfType ($ operationElementValue );
250251 if (!empty ($ linkName )) {
251- $ linkName = $ linkName[ 0 ] ;
252+ $ linkName = array_pop ( $ linkName) ;
252253 return DataObjectHandler::getInstance ()->getObject ($ linkName );
253254 }
254255 return null ;
You can’t perform that action at this time.
0 commit comments