[FLOW3-general] Exception by Doctrine
"Christian Müller (Kitsunet)"
christian.mueller at typo3.org
Sun Nov 13 13:42:59 CET 2011
On 12/11/11 18:15, Georg Grossberger wrote:
> Hi list
Hi Georg,
>
> <?php
> namespace My\Package\Domain\Model;
>
> use TYPO3\FLOW3\Annotations as FLOW3;
> use Doctrine\ORM\Mapping as ORM;
>
> /**
> *
> * @FLOW3\Scope("prototype")
> * @FLOW3\Entity
> */
> class Inventory {
>
> /**
> * Items
> *
> * @var
> \Doctrine\Common\Collections\Collection<\My\Package\Domain\Model\Item>
> * @FLOW3\Lazy
> * @ORM\ManyToMany
> */
> protected $items;
>
> /**
> * Constructor
> *
> */
> public function __construct() {
> $this->items = new \Doctrine\Common\Collections\ArrayCollection();
> }
> }
> ?>
maybe just a copy and paste error, but @var is
\Doctrine\Common\Collections\Collection, but in __contruct you do new
\Doctrine\Common\Collections\ArrayCollection(). Maybe it is as simple as
that, because besides from that this part of the code looks good to me.
Cheers,
Christian
More information about the FLOW3-general
mailing list