Skip to content

Commit

Permalink
PAC-894 Use 'raw_id' instead of 'entity_id' for an enterprise edition
Browse files Browse the repository at this point in the history
  • Loading branch information
svizevv committed Jul 26, 2024
1 parent e273c3d commit d228997
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
34 changes: 34 additions & 0 deletions src/Observers/EeCleanUpGroupedObserver.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php
/**
* Copyright (c) 2024 TechDivision GmbH <[email protected]> - TechDivision GmbH
* All rights reserved
*
* This product includes proprietary software developed at TechDivision GmbH, Germany
* For more information see https://www.techdivision.com
*
* To obtain a valid license for using this software, please contact us at
* [email protected]
*/
declare(strict_types=1);

namespace TechDivision\Import\Product\Grouped\Ee\Observers;

use TechDivision\Import\Product\Grouped\Observers\CleanUpGroupedProductRelationObserver;

/**
* @copyright Copyright (c) 2024 TechDivision GmbH <[email protected]> - TechDivision GmbH
* @link http://www.techdivision.com
* @author MET <[email protected]>
*/
class EeCleanUpGroupedObserver extends CleanUpGroupedProductRelationObserver
{
/**
* Return's the PK to create the grouped product => child relation.
*
* @return int The PK to create the relation with
*/
protected function getLastPrimaryKey(): int
{
return $this->getSubject()->getLastRowId();
}
}
5 changes: 4 additions & 1 deletion symfony/Resources/config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
<service id="import_product_grouped_ee.observer.grouped.product.relation.update" class="TechDivision\Import\Product\Grouped\Ee\Observers\EeGroupedProductRelationUpdateObserver">
<argument type="service" id="import_product_grouped.processor.product.grouped"/>
</service>
<service id="import_product_grouped_ee.observer.clean.up.product.grouped" class="TechDivision\Import\Product\Grouped\Ee\Observers\EeCleanUpGroupedObserver">
<argument type="service" id="import_product_grouped.processor.product.grouped"/>
</service>

<service id="import_product_grouped_ee.subject.grouped" class="TechDivision\Import\Product\Grouped\Ee\Subjects\EeGroupedSubject" shared="false">
<argument type="service" id="import.processor.registry"/>
Expand Down Expand Up @@ -44,4 +47,4 @@

</services>

</container>
</container>

0 comments on commit d228997

Please sign in to comment.