From 1c9353edea1a92a2d21a858e45c37f2a0bfe38e3 Mon Sep 17 00:00:00 2001 From: Serhii Zhuravel <1804871+dxops@users.noreply.github.com> Date: Wed, 27 Dec 2023 13:14:21 +0200 Subject: [PATCH 1/3] Transfer note --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index deebc01f..6009bd72 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,11 @@ # Akeneo PIM OroCommerce Connector +## New maintainer + +We would like to inform you about the recent transfer of repository maintenance responsibility from OroInc to Creativestyle. This transition aims to enhance the development and support of OroInc projects, providing a seamless experience for users and contributors. + +* [creativestyle/OroAkeneoBundle](https://github.com/creativestyle/OroAkeneoBundle) + ## Short overview This extension allows you to connect [OroCommerce Enterprise](https://oroinc.com/b2b-ecommerce/) with [Akeneo PIM Enterprise](https://www.akeneo.com/) and use the latter’s rich capabilities for product information management with your OroCommerce-powered web store. Combine personalized B2B buying experience with compelling product experience to maximize your content marketing ROI and stay ahead of the B2B eCommerce game. From 24fe1104b45cc712860e892228305e173b074e1d Mon Sep 17 00:00:00 2001 From: Maciej Garycki Date: Wed, 6 Mar 2024 09:01:24 +0100 Subject: [PATCH 2/3] OSD-12116: - moved method call that loaded redundand proxied item data when it was not needed; method moved from outside into if statement scope --- .../Strategy/StrategyRelationsTrait.php | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/ImportExport/Strategy/StrategyRelationsTrait.php b/ImportExport/Strategy/StrategyRelationsTrait.php index a2907df6..ff854cfa 100644 --- a/ImportExport/Strategy/StrategyRelationsTrait.php +++ b/ImportExport/Strategy/StrategyRelationsTrait.php @@ -39,13 +39,6 @@ protected function updateRelations($entity, array $itemData = null) $isFullRelation = $this->fieldHelper->getConfigValue($entityName, $fieldName, 'full', false); $isPersistRelation = $this->databaseHelper->isCascadePersist($entityName, $fieldName); - $searchContext = $this->generateSearchContextForRelationsUpdate( - $entity, - $entityName, - $fieldName, - $isPersistRelation - ); - if ($this->fieldHelper->isSingleRelation($field)) { // single relation $relationEntity = $this->getObjectValue($entity, $fieldName); @@ -56,7 +49,12 @@ protected function updateRelations($entity, array $itemData = null) $isFullRelation, $isPersistRelation, $relationItemData, - $searchContext, + $this->generateSearchContextForRelationsUpdate( + $entity, + $entityName, + $fieldName, + $isPersistRelation + ), true ); } @@ -73,7 +71,12 @@ protected function updateRelations($entity, array $itemData = null) $isFullRelation, $isPersistRelation, $entityItemData, - $searchContext, + $this->generateSearchContextForRelationsUpdate( + $entity, + $entityName, + $fieldName, + $isPersistRelation + ), true ); From e1a3ec957e63a9ff5a6ad79a70ee35a6476d8e72 Mon Sep 17 00:00:00 2001 From: Maciej Garycki Date: Wed, 6 Mar 2024 11:35:23 +0100 Subject: [PATCH 3/3] OSD-12116: additional performance improvement --- ImportExport/Strategy/StrategyRelationsTrait.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/ImportExport/Strategy/StrategyRelationsTrait.php b/ImportExport/Strategy/StrategyRelationsTrait.php index ff854cfa..282d45e2 100644 --- a/ImportExport/Strategy/StrategyRelationsTrait.php +++ b/ImportExport/Strategy/StrategyRelationsTrait.php @@ -62,8 +62,14 @@ protected function updateRelations($entity, array $itemData = null) } elseif ($this->fieldHelper->isMultipleRelation($field)) { // multiple relation $relationCollection = $this->getObjectValue($entity, $fieldName); - if ($relationCollection instanceof Collection) { + if (($relationCollection instanceof Collection) && $relationCollection->count()) { $collectionItemData = $this->fieldHelper->getItemData($itemData, $fieldName); + $searchContext = $this->generateSearchContextForRelationsUpdate( + $entity, + $entityName, + $fieldName, + $isPersistRelation + ); foreach ($relationCollection as $collectionEntity) { $entityItemData = $this->fieldHelper->getItemData(array_shift($collectionItemData)); $existingCollectionEntity = $this->processEntity( @@ -71,12 +77,7 @@ protected function updateRelations($entity, array $itemData = null) $isFullRelation, $isPersistRelation, $entityItemData, - $this->generateSearchContextForRelationsUpdate( - $entity, - $entityName, - $fieldName, - $isPersistRelation - ), + $searchContext, true );