[Flow] Creating Entity Entries in Migration
Adrian Föder
adrian at foeder.de
Tue Apr 1 10:37:22 CEST 2014
Hi Christian,
the migrations are not intended to use the Persistence- or Entity
manager or so.
You should as well as possible just use plain SQL.
For generating UUIDs, just use the exact same method as Flow itself when
creating Entities: \TYPO3\Flow\Utility\Algorithms::generateUUID
HTH,
Adrian
Am 01.04.2014 10:05, schrieb Christian:
> Hello,
>
> I need to create some Database entries in my Migration scripts. I tried
> injecting my Repository and creating Object as usual by instanciating my
> model Objects, and add then to the repository. However, to persist
> those, i need the persistenceManager, which for i can't inject, for some
> reason I don't know...
>
> HP Fatal error: Call to a member function persistAll() on a non-object .
>
> I injected it as I always do:
>
> /**
> * @Flow\Inject
> * @var \TYPO3\Flow\Persistence\PersistenceManagerInterface
> */
> protected $persistenceManager;
>
> I allready figured out, that I might need to create my DB entries on my
> own, by writing to the database. However, for this to work, i need to
> generate persistence_object_idetifiers. Can someone tell me how to do
> this? Or is there a better way of handling this kind of migration?
>
> Cheers,
>
> Christian
More information about the Flow
mailing list