'asc'])] #[ORM\JoinColumn('brand_id', referencedColumnName: 'id', nullable: FALSE)] private Brand $brand; #[ORM\Column('model', type: 'string')] private string $model; /** * @var Collection */ #[ORM\ManyToMany(targetEntity: Socket::class, inversedBy: 'cpus', fetch: 'LAZY')] #[ORM\JoinTable('collection.motherboard_socket_link')] #[ORM\JoinColumn('motherboard_id', referencedColumnName: 'id')] #[ORM\InverseJoinColumn('socket_id', referencedColumnName: 'id')] #[ORM\OrderBy(['name' => 'asc'])] private Collection $sockets; #[ORM\ManyToOne(targetEntity: Chipset::class, fetch: 'EAGER')] #[ORM\OrderBy(['name' => 'asc'])] #[ORM\JoinColumn('chipset_id', 'id', FALSE)] private Chipset $chipset; #[ORM\Column('link', type: 'string')] private string $link; #[ORM\Column('notes', type: 'text', nullable: true)] private ?string $notes = ''; // ------------------------------------------------------------------------ public function __construct() { $this->sockets = new ArrayCollection(); } public function addSocket(Socket $socket): self { if ( ! $this->sockets->contains($socket)) { $this->sockets->add($socket); } return $this; } public function removeSocket(Socket $socket): self { $this->sockets->removeElement($socket); return $this; } }