resolveMappingParents example



        $updates = array_merge_recursive($results['updated']$updates);

        return new WriteResult($mapped$notFoundarray_filter($updates));
    }

    private function resolveParents(EntityDefinition $definition, array $ids, bool $delete = false): array
    {
        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();

        
Home | Imprint | This part of the site doesn't use cookies.