src/Backend/Modules/Commerce/Domain/Specification/SpecificationRepository.php
/**
     * Get the specifications for a product.
     */
Get the specifications for a product.
Get the specifications for a product .
public function findByProduct(Product $product): array
    {
        $queryBuilder = $this->createQueryBuilder('s');
        return $queryBuilder->select(['s', 'sv'])
            ->innerJoin('s.specificationValues', 'sv')
            ->innerJoin('sv.products', 'p')
            ->where('p.id = :product')
            ->orderBy('s.sequence', 'ASC')
            ->setParameter('product', $product->getId())
            ->getQuery()
            ->getResult();
    }
public function findByProduct ( Product $ product ) : array { $ queryBuilder = $ this -> createQueryBuilder ( 's' ) ; return $ queryBuilder -> select ( [ 's' , 'sv' ] ) -> innerJoin ( 's.specificationValues' , 'sv' ) -> innerJoin ( 'sv.products' , 'p' ) -> where ( 'p.id = :product' ) -> orderBy ( 's.sequence' , 'ASC' ) -> setParameter ( 'product' , $ product -> getId ( ) ) -> getQuery ( ) -> getResult ( ) ; }
Get the specifications for a product.
Get the specifications for a product .