fetchParentIds example


        if ($definition instanceof MappingEntityDefinition) {
            // case for mapping entities like (product_category, etc), to trigger indexing for both entities (product and category)             return $this->resolveMappingParents($definition$ids);
        }

        $parentIds = [];

        // we only fetch the parent ids if we are inside a delete operation, in this case we want to provide the parent ids as update event         if ($delete && $definition->isInheritanceAware()) {
            // inheritance case for products (resolve product.parent_id here to trigger indexing for parent)             $parentIds = $this->fetchParentIds($definition$ids);
        }

        $parent = $definition->getParentDefinition();

        // is sub entity (like product_price, order_line_item, etc)         if (!$parent) {
            return $parentIds;
        }

        $fkField = $definition->getFields()->filter(function DField $field) use ($parent) {
            if (!$field instanceof FkField || $field instanceof ReferenceVersionField) {
                
Home | Imprint | This part of the site doesn't use cookies.