SnelleJelle
SnelleJelle

Reputation: 963

Can't create entities from database

I have an existing MySql database and I'm trying to extract the entities. I'm using a symfony project but I'm new to the whole symfony thing. I've tried php bin/console doctrine:mapping:import --force AcmeBlogBundle xml like it says on their website but I'm getting an error: http://i.imgur.com/wsgpKmw.jpg

Can anyone help me out? thanks!

Upvotes: 0

Views: 233

Answers (2)

DonCallisto
DonCallisto

Reputation: 29932

You need to enable AcmeBlogBundle in your AppKernel

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
                [...] //other bundles
                new Acme\BlogBundle\AcmeBlogBundle(),
            );
        }
    }
}

Remember that AcmeBundle(s) are test ones, so if you need to develop your custom solution, is better to create your own bundle

Upvotes: 1

Cédric Nilly
Cédric Nilly

Reputation: 380

As written in the documentation, you have to enable the bundle: just edit the AppKernel.php:

class AppKernel extends Kernel
{
// ...

public function registerBundles()
{
    $bundles = array(
        // ...
            new FOS\UserBundle\FOSUserBundle(),
        );

        // ...
    }
}

Upvotes: 1

Related Questions