php - Doctrine2 - Generate From Database -


i generated entities existing mysql database, fail when trying generate repository classes.

my doctrine.config.php

$frapi_config = array(     'database' => array(         'driver' => 'pdo_mysql',         'user' => 'root',         'password' => 'root',         'dbname' => 'pizzavan',         'host' => 'localhost:3306'     ),     'doctrine' => array (         // base path /src/frapi/         'entitiesfolder' => "custom/application/model"     ) ); 

my bootstrap.php

//bootstrap.php  use doctrine\orm\tools\setup; use doctrine\orm\entitymanager;  require_once dirname(__file__) . "/../vendor/autoload.php"; require_once "doctrine.config.php";  // create simple "default" doctrine orm configuration annotations $isdevmode = true;  $config = setup::createannotationmetadataconfiguration(array(__dir__ . "/../" . $frapi_config["doctrine"]["entitiesfolder"]), $isdevmode, null, null, false);  // database configuration parameters $conn = $frapi_config["database"];  // obtaining entity manager $entitymanager = entitymanager::create($conn, $config); 

my cli-config.php

require_once "bootstrap.php";  return \doctrine\orm\tools\console\consolerunner::createhelperset($entitymanager); 

as said before, if run 2 commands console

./vendor/bin/doctrine orm:convert-mapping --namespace='custom\\application\\model\\' --force --from-database annotation . 

and

./vendor/bin/doctrine orm:generate-entities . --generate-annotations=true --generate-methods=true 

i entities correctly created in right folder. create custom repositoryclass, if run

./vendor/bin/doctrine orm:generate-repositories . 

i message : "no repository classes found processed". solution? thank you!


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -