Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [ZF][ZendFramework] Doctrine nie generuje model oraz tabeli w bazie danych.
tejek
post
Post #1





Grupa: Zarejestrowani
Postów: 41
Pomógł: 0
Dołączył: 12.11.2005

Ostrzeżenie: (0%)
-----


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-reload

  1. Running Doctrine CLI.
  2. build-all-reload - Are you sure you wish to drop your databases? (y/n)
  3. y
  4. build-all-reload - Successfully dropped database for connection named 'doctrine'
  5.  
  6. build-all-reload - Successfully created database for connection named 'doctrine'
  7.  
  8. build-all-reload - Created tables successfully
  9. build-all-reload - Data was successfully loaded


Oczywiść brakuje w tym komunikacie takiej linijki

  1. Generated models successfully form YAML schema


Co może być powodem takiego wyniku??

Bootstrap.php i Doctrine.php mam skonfigurowane tak:

Bootstrap.php
  1. public function _initDoctrine()
  2. {
  3.  
  4. $this->getApplication()->getAutoloader()
  5. ->pushAutoloader(array('Doctrine', 'autoload'));
  6. spl_autoload_register(array('Doctrine', 'modelsAutoload'));
  7.  
  8. $manager = Doctrine_Manager::getInstance();
  9.  
  10. $manager->setAttribute(Doctrine::ATTR_AUTO_ACCESSOR_OVERRIDE, true);
  11. $manager->setAttribute(Doctrine::ATTR_MODEL_LOADING, Doctrine::MODEL_LOADING_CONSERVATIVE);
  12. $manager->setAttribute(Doctrine::ATTR_AUTOLOAD_TABLE_CLASSES, true);
  13.  
  14. $doctrineConfig = $this->getOption('doctrine');
  15.  
  16. Doctrine::loadModels($doctrineConfig['models_path']);
  17.  
  18. $conn = Doctrine_Manager::connection($doctrineConfig['dsn'],'doctrine');
  19. $conn->setAttribute(Doctrine::ATTR_USE_NATIVE_ENUM, true);
  20. return $conn;
  21. }



doctrine.php
  1. defined('APPLICATION_PATH')
  2. || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
  3.  
  4. // Define application environment
  5. defined('APPLICATION_ENV')
  6. || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
  7.  
  8. set_include_path(implode(PATH_SEPARATOR, array(
  9. realpath(APPLICATION_PATH . '/../library'),
  10. )));
  11.  
  12. require_once 'Zend/Application.php';
  13.  
  14. // Create application, bootstrap, and run
  15. $application = new Zend_Application(
  16. APPLICATION_ENV,
  17. APPLICATION_PATH . '/configs/application.ini'
  18. );
  19.  
  20. $loader = Zend_Loader_Autoloader::getInstance();
  21. $loader->pushAutoloader(array('Doctrine_Core', 'autoload'));
  22.  
  23. $application->getBootstrap()->bootstrap('doctrine');
  24.  
  25. $cli = new Doctrine_Cli($application->getOption('doctrine'));
  26. $cli->run($_SERVER['argv']);
  27.  


Ten post edytował tejek 5.02.2011, 14:45:17
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 21.08.2025 - 16:09