[FLOW3-general] Exception by Doctrine

Georg Grossberger georg at grossberger.at
Mon Nov 14 15:19:10 CET 2011


Hi
 >
 > 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.

Tried that, and other combinations, no difference. Also checked if any 
submodules were missing, nothing wrong there.
I use the same code as the models in TYPO3.Party package and as listed 
in the quickstart document and the manual.

The exception is not thrown because the file is not loaded, it is! It is 
even copied into the Data/Cache directory. The AnnotationDriver of FLOW3 
simply does not parse it. Any ideas why? How to teach 
TYPO3\FLOW3\Persistence\Doctrine\Mapping\Driver\Flow3AnnotationDriver to 
load the data for this class or interface?

BTW: No difference between windows and linux systems.


> 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();
>> }
>> }
>> ?>
>
> Cheers,
> Christian



More information about the FLOW3-general mailing list