Witam mam problem z doctrine otóż zainstalowałem Doctrine tak jak jest to pokazana na ZC i Doctrine tworzy mi baze jednak w tej bazie nie generuje mi tabeli oraz models w projekcie ;/ Oto jaki dostaje komunikat po wpisanu w konsoli:
doctrine build-all-reloadRunning Doctrine CLI.
build-all-reload - Are you sure you wish to drop your databases? (y/n)
y
build-all-reload - Successfully dropped database for connection named 'doctrine'
build-all-reload - Successfully created database for connection named 'doctrine'
build-all-reload - Created tables successfully
build-all-reload - Data was successfully loaded
Oczywiść brakuje w tym komunikacie takiej linijki
Generated models successfully form YAML schema
Co może być powodem takiego wyniku??
Bootstrap.php i Doctrine.php mam skonfigurowane tak:
Bootstrap.php
public function _initDoctrine()
{
$this->getApplication()->getAutoloader()
->pushAutoloader(array('Doctrine', 'autoload')); spl_autoload_register
(array('Doctrine', 'modelsAutoload'));
$manager = Doctrine_Manager::getInstance();
$manager->setAttribute(Doctrine::ATTR_AUTO_ACCESSOR_OVERRIDE, true);
$manager->setAttribute(Doctrine::ATTR_MODEL_LOADING, Doctrine::MODEL_LOADING_CONSERVATIVE);
$manager->setAttribute(Doctrine::ATTR_AUTOLOAD_TABLE_CLASSES, true);
$doctrineConfig = $this->getOption('doctrine');
Doctrine::loadModels($doctrineConfig['models_path']);
$conn = Doctrine_Manager::connection($doctrineConfig['dsn'],'doctrine');
$conn->setAttribute(Doctrine::ATTR_USE_NATIVE_ENUM, true);
return $conn;
}
doctrine.php
// Define application environment
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ?
getenv('APPLICATION_ENV') : 'production'));
realpath(APPLICATION_PATH
. '/../library'), )));
require_once 'Zend/Application.php';
// Create application, bootstrap, and run
$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH . '/configs/application.ini'
);
$loader = Zend_Loader_Autoloader::getInstance();
$loader->pushAutoloader(array('Doctrine_Core', 'autoload'));
$application->getBootstrap()->bootstrap('doctrine');
$cli = new Doctrine_Cli($application->getOption('doctrine'));
$cli->run($_SERVER['argv']);
Ten post edytował tejek 5.02.2011, 14:45:17