#6442: $this->_modelName expect a pluralize parameter
---------------------------+------------------------------------------------
    Reporter:  mzrobson    |         Owner:           
        Type:  Bug         |        Status:  new      
    Priority:  Medium      |     Milestone:  1.2.x.x  
   Component:  General     |       Version:  1.2 Final
    Severity:  Normal      |    Resolution:           
    Keywords:              |   Php_version:  PHP 5    
Cake_version:  1.2.3.8166  |  
---------------------------+------------------------------------------------
Comment (by mzrobson):

 I create two entities,

 /* Create table 'Contas' */
 CREATE TABLE contas (
     id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
         codigo int NOT NULL,
         nome VARCHAR(255) NOT NULL UNIQUE,
     created DATETIME,
     modified DATETIME
 ) DEFAULT CHARSET=utf8
 ;

 /* Create table 'Lancamentos' */
 CREATE TABLE lancamentos (
     id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
         conta_id int NOT NULL,
         datalan datetime NOT NULL,
         valor numeric(12,2) NOT NULL,
         descricao char(80) NOT NULL,
     created DATETIME,
     modified DATETIME
 ) DEFAULT CHARSET=utf8
 ;

 Then, I use o Cake Bake to create a MVC application to Contas and
 Lancamentos.
 When asked ...
 Would you like to include some basic class methods (index(), add(),
 view(), edit
 ())? (y/n)
 [n] > y

 After this, when I select Lancamentos in browse I receive the folowing
 message ...
 Notice (8): Undefined property:  Lancamento::$Contum
 [APP\controllers\lancamentos_controller.php, line 30]

 Code

             }

         }

         $contas = $this->Lancamento->Contum->find('list');

 LancamentosController::add() - APP\controllers\lancamentos_controller.php,
 line 30
 Object::dispatchMethod() - CORE\cake\libs\object.php, line 115
 Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 227
 Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 194
 [main] - APP\webroot\index.php, line 88


 Fatal error: Call to a member function find() on a non-object in
 C:\xampp\htdocs\cake_1_2\bccd\controllers\lancamentos_controller.php on
 line 30

-- 
Ticket URL: <https://trac.cakephp.org/ticket/6442#comment:2>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design 
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. 
Our primary goal is to provide a structured framework that enables PHP users at 
all levels to rapidly develop robust web applications, without any loss to 
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"tickets cakephp" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to