Got models with relations. When use getResult() method:
$result = $queryBuilderProducts
->select('pr')
->from(Product::class, "pr")
->getQuery()
->getResult();
I get this error:
Notice: Undefined index: productProperties in ...doctrine\orm\lib\Doctrine\ORM\Internal\ObjectHydrator.php on line 122
Product.php:
/**
* @var \Showcases\Entity\ProductProperty[]
*
* @ORM\OneToMany(targetEntity="Showcases\Entity\ProductProperty", mappedBy="product", fetch="EAGER", cascade={"persist", "remove"})
* @ORM\OrderBy({"id" = "ASC"})
*/
private $productProperties;
ProductProperties.php:
/**
* @var \Showcases\Entity\Product
*
* @ORM\ManyToOne(targetEntity="Showcases\Entity\Product", inversedBy="productProperties", fetch="EXTRA_LAZY")
* @ORM\JoinColumn(name="product_id", referencedColumnName="id", nullable=true)
*/
private $product;