getByteList example

->price(100)
                ->build(),
        ];

        $this->getContainer()->get('product.repository')->create($products, Context::createDefaultContext());

        $criteria = new Criteria($ids->getList(['p1', 'p2']));
        $result = $this->getContainer()->get('product.repository')->searchIds($criteria, Context::createDefaultContext());

        $increments = $this->getContainer()->get(Connection::class)->fetchAllKeyValue(
            'SELECT LOWER(HEX(id)) as id, auto_increment FROM product WHERE id IN (:ids)',
            ['ids' => $ids->getByteList(['p1', 'p2'])],
            ['ids' => ArrayParameterType::STRING]
        );

        $data = $result->getData();
        static::assertArrayHasKey($ids->get('p1')$data);
        static::assertArrayHasKey('productNumber', $data[$ids->get('p1')]);
        static::assertArrayHasKey('autoIncrement', $data[$ids->get('p1')]);

        static::assertArrayHasKey($ids->get('p2')$data);
        static::assertArrayHasKey('productNumber', $data[$ids->get('p2')]);
        static::assertArrayHasKey('autoIncrement', $data[$ids->get('p2')]);
        
Home | Imprint | This part of the site doesn't use cookies.