Question

I get that it saves into PHPCR through Doctrine ODM.

But I get that it is all saved in app.sqlite, but I don't see how does it works conceptually ?

Why does it need the database at all when everything is saved in app.sqlite? Why do I need to make this kind of commands php app/console doctrine:phpcr:init:dbal and so on ?

Was it helpful?

Solution

Symfony CMF can work with different model classes. we provide a default implementation that is mapped for Doctrine PHPCR-ODM. PHPCR-ODM in turn is built on the php content repository PHPCR. there are 3 implementations of that, the cmf sandbox by default uses jackalope-doctrine-dbal. jackalope-doctrine-dbal in turn uses doctrine dbal to store content into databases supported by doctrine dbal. jackalope currently handles sqlite, mysql and postgres. jackalope-doctrine-dbal needs some initialization on the first run, which are the commands you have seen. this is the same whether we use the embedded sqlite database driver or mysql or postgres.

You find some background for the choices in choosing a storage layer and information how to set up phpcr-odm in Create a New Project with PHPCR-ODM. Look around at http://symfony.com/doc/master/cmf/index.html to have most of the CMF concepts and implementation explained.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top