Hi,

thank you very much for your reply! We actually did not modify the doctrine 
installation.
We use a MySQL database and a shell script which creates xml files from 
this database.
With the schema tool we'd like to create the SQLite database from the xml 
files, if you mean this with configured mappings.

    'doctrine' => array(
        'driver' => array(
            'Core_driver' => array(
                'class' => 'Doctrine\\ORM\\Mapping\\Driver\\XmlDriver',
                'paths' => array(
                    0 => __DIR__ . '/../src/Core/V1/Doctrine/Entity',
                ),
            ),
            'orm_default' => array(
                'drivers' => array(
                    'Core\\V1\\Doctrine\\Entity' => 'Core_driver',
                ),
            ),
        ),
        'fixture' => array(
            'Core_fixture' => __DIR__ . '/../src/Core/V1/Doctrine/Fixture',
        ),
    ),



Am Freitag, 8. Mai 2015 10:06:35 UTC+2 schrieb Marco Pivetta:
>
> Hi Lukas,
>
> Does this happen also with a raw ORM installation? Do you have any 
> configured mappings?
>
> Marco Pivetta 
>
> http://twitter.com/Ocramius      
>
> http://ocramius.github.com/
>
> On 8 May 2015 at 08:54, Lukas Liebig <[email protected] <javascript:>> 
> wrote:
>
>> Hello everybody!
>>
>> I'd like to use PHPUnit in ZF2 with Doctrine2. Therefore I want to create 
>> a SQLite database from the Doctrine metadata using the Doctrine Schema 
>> Tool. Unfortunately, I get the following error message:
>>
>> PHP Fatal error:  Uncaught exception 
>> 'Doctrine\DBAL\Schema\SchemaException' with message 'The table with name 
>> 'db.sqlite.core_resource_privilege' already exists.' in 
>> /var/www/html/ic_web_framework/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/SchemaException.php:109
>> Stack trace:
>> #0 
>> /var/www/html/ic_web_framework/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Schema.php(132):
>>  
>> Doctrine\DBAL\Schema\SchemaException::tableAlreadyExists('db.sqlite.core_...')
>> #1 
>> /var/www/html/ic_web_framework/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Schema.php(340):
>>  
>> Doctrine\DBAL\Schema\Schema->_addTable(Object(Doctrine\DBAL\Schema\Table))
>> #2 
>> /var/www/html/ic_web_framework/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/SchemaTool.php(510):
>>  
>> Doctrine\DBAL\Schema\Schema->createTable('core_resource_p...')
>> #3 
>> /var/www/html/ic_web_framework/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/SchemaTool.php(245):
>>  
>> Doctrine\ORM\Tools\SchemaTool->gatherRelationsSql(Object(Doctrine\ORM\Mapping\ClassMetadata),
>>  
>> Object(Doctrine\DBAL\Schema\Table), Object(Doctrine\DBAL\Sche in 
>> /var/www/html/ic_web_framework/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/SchemaException.php
>>  
>> on line 109
>>
>>
>> This is my driver definition:
>> return array(
>>     'doctrine' => array(
>>         'connection' => array(
>>             'orm_default' => array(
>>                 'driverClass' => 'Doctrine\DBAL\Driver\PDOSqlite\Driver',
>>                 'params' => array(
>>                     'charset' => 'utf8',
>>                     'path'    =>  'db.sqlite',
>>                     'memory' => true,
>>                 )
>>             )
>>         )
>>     ), 
>> );
>>
>> My bootstrap.php looks like this:
>>         $serviceManager = new ServiceManager(new ServiceManagerConfig());
>>         $serviceManager->setService('ApplicationConfig', $config);
>>         $serviceManager->get('ModuleManager')->loadModules();
>>
>>         static::$serviceManager = $serviceManager;
>>         static::$config = $config; 
>>         $em=$serviceManager->get('doctrine.entitymanager.orm_default');
>>         $tool= new SchemaTool($em);
>>         if(!$em instanceof EntityManager){
>>         }
>>         $tool->dropSchema($em->getMetadataFactory()->getAllMetadata());
>>         $tool->createSchema($em->getMetadataFactory()->getAllMetadata()); 
>>
>>
>> I would be very thankful for your help!
>>
>> Greeting
>> Lukas Liebig
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "doctrine-user" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/doctrine-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to