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)
245
245
private function resolveOperationObjectAndEntityData ($ entityObject , $ operationElementValue )
246
246
{
247
247
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
249
250
$ linkName = $ entityObject ->getLinkedEntitiesOfType ($ operationElementValue );
250
251
if (!empty ($ linkName )) {
251
- $ linkName = $ linkName[ 0 ] ;
252
+ $ linkName = array_pop ( $ linkName) ;
252
253
return DataObjectHandler::getInstance ()->getObject ($ linkName );
253
254
}
254
255
return null ;
You can’t perform that action at this time.
0 commit comments