[FLOW3-general] Property is not created in the database
Stephen Bungert
stephenbungert at yahoo.de
Mon Feb 4 09:51:04 CET 2013
Hi,
thanks for your help. I had the book column in pages, but like I said, I
thought it would be like TYPO3 with a count kept in the pages column in the
book table.
It's all working now the way I want. Thanks aagin.
Stephen.
"Mathis Hoffmann" <mathis at hoffpost.de> schrieb im Newsbeitrag
news:mailman.2056.1359837323.609.flow3-general at lists.typo3.org...
> Sure there is no pages column on the book table. The reason is that in
> an RDBMS (like MySQL is) only simple types can be persisted - and pages
> is not a simple type. Doctrine instead creates a column book in the
> page table and writes the owning book's uuid to that column. You should
> have the following in your page-model:
>
> /**
> * @var \Gamebook\Gamebook\Domain\Model\Book
> * @ORM\ManyToOne(inversedBy("pages"))
> */
> protected $book;
>
> If you insert that into your page-model everything will, as far as I
> can say that without testing, work fine.
>
> Mathis
>
>
> Am Sa 02 Feb 2013 19:43:26 CET schrieb Stephen Bungert:
>> Am 02.02.2013 19:12, schrieb Stephen Bungert:
>>> Hello!
>>>
>>> The following property is not created when I run ./flow doctrine:update
>>>
>>> /**
>>> * The pages that make up the book.
>>> *
>>> * @var
>>> \Doctrine\Common\Collections\Collection<\Gamebook\Gamebook\Domain\Model\Page>
>>>
>>>
>>> * @ORM\OneToMany(mappedBy="book")
>>> * @ORM\OrderBy({"section" = "ASC"})
>>> */
>>> protected $pages;
>>>
>>> Does anyone see what I have done wrong... all the other fields are
>>> created.
>>>
>>> Stephen.
>>
>>
>> After I fixed some wrong class names in my page model and created some
>> pages, these pages are found and shown in the FE for the book... but
>> there is still no pages column on the book table. Is this how it is
>> suppossed to be in flow3? I thought it would be like TYPO3 where the
>> pages column would then keep a count of the number of pages associated
>> with a book.
>>
>> Stephen.
>> _______________________________________________
>> FLOW3-general mailing list
>> FLOW3-general at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general
>
More information about the FLOW3-general
mailing list