#5973: When in debugging mode, announce if a model is being made automatically
--------------------------------------------------+-------------------------
    Reporter:  Aijo                               |          Type:  Enhancement 
  
      Status:  new                                |      Priority:  Low         
  
   Milestone:  1.2.x.x                            |     Component:  Error 
Handling
     Version:  1.2 Final                          |      Severity:  Minor       
  
    Keywords:  find all left join id primary key  |   Php_version:  n/a         
  
Cake_version:                                     |  
--------------------------------------------------+-------------------------
 If debug is set to 2 or above ''(via configure::write('debug', 2); )'' and
 a model is being made automatically due to a model file not being present
 even though a belongsTo relationship exists, then in the debug output
 announce that 'Some models are being made automatically'.[[BR]][[BR]]


 This way if someone wishes automatic models to be used then it only adds
 one line of clutter to the debug. But if a model is being made
 automatically because of a naming convention oversight or something
 similar then they can be alerted to the fact that
 a model is being made automatically.[[BR]][[BR]]


 After checking my code several times and it proving to be perfect, I was
 still receiving an error with the SQL query, it was looking for model.id
 instead of the define primaryKey in my model, I had no idea cakephp could
 make models automatically in the case of one missing. It turned out that I
 hadn't named my file with the appropriate naming conventions (it was named
 clientlocations.php insetad of client_locations.php). This nature of error
 wasn't covered by the debugger and I feel it would help new bakers to
 diagnose problems with Model::find();[[BR]][[BR]]

 Thanks for your time.

-- 
Ticket URL: <https://trac.cakephp.org/ticket/5973>
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
-~----------~----~----~----~------~----~------~--~---

  • [CakePHP : The Rapid Dev... CakePHP : The Rapid Development Framework for PHP

Reply via email to