Use the correct target entities for Devices and Supplier children.

This commit is contained in:
Jan Böhmer 2019-04-05 23:31:48 +02:00
parent f45441352e
commit d17c4a2b6f
2 changed files with 4 additions and 4 deletions

View file

@ -43,12 +43,12 @@ use Doctrine\ORM\Mapping as ORM;
class Device extends PartsContainingDBElement
{
/**
* @ORM\OneToMany(targetEntity="Category", mappedBy="parent")
* @ORM\OneToMany(targetEntity="Device", mappedBy="parent")
*/
protected $children;
/**
* @ORM\ManyToOne(targetEntity="Category", inversedBy="children")
* @ORM\ManyToOne(targetEntity="Device", inversedBy="children")
* @ORM\JoinColumn(name="parent_id", referencedColumnName="id")
*/
protected $parent;

View file

@ -43,12 +43,12 @@ use Doctrine\ORM\Mapping as ORM;
class Supplier extends Company
{
/**
* @ORM\OneToMany(targetEntity="Category", mappedBy="parent")
* @ORM\OneToMany(targetEntity="Supplier", mappedBy="parent")
*/
protected $children;
/**
* @ORM\ManyToOne(targetEntity="Category", inversedBy="children")
* @ORM\ManyToOne(targetEntity="Supplier", inversedBy="children")
* @ORM\JoinColumn(name="parent_id", referencedColumnName="id")
*/
protected $parent;