I had the same problem for baking
I check the problem, it seems like cakePHP doesn't like underscored
table name anymore

so to pass through i hacked the bake.php :
900   $modelObj =& ClassRegistry::getObject($modelKey);
replace by :
901   $modelObj =& ClassRegistry::getObject($currentModelName);

even through, I can bake again, there are a warning appears on a
foreach and some problems appear in views where associated attributes
are displayed.

Maybe it is not related, but I have another problem with underscored
table name that generate a fatal error: Allowed memory size of xxxx
bytes exhausted
because I have a underscored table name model which is associated to a
underscored table name :o
for instance : order_item hasOne client_invoice_Entry . And I also
have a client_invoice class :/

Tell me if you understand what I want to explain, because I am not
very good in written english and explanation.

Hope that could help !

On 25 jan, 02:56, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> CREATE TABLE IF NOT EXISTS `line_items` (
>   `id` int(11) NOT NULL auto_increment,
>   `title` varchar(32) NOT NULL,
>   PRIMARY KEY  (`id`)
> ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
>
> The model in models/line_item.php:
> <?php
> class LineItem extends AppModel {
>   var $name = 'LineItem';}
>
> ?>
>
> The controller in controllers/line_items_controller.php
> <?php
> class LineItemsController extends AppController {
>   var $name = 'LineItems';
>   var $scaffold;}
>
> ?>
>
> The errors fromhttp://localhost/line_items/:
> Notice: Trying to get property of non-object in /home/scott/
> public_html/cakeblog/cake/libs/controller/controller.php on line 666
>
> Notice: Trying to get property of non-object in /home/scott/
> public_html/cakeblog/cake/libs/controller/controller.php on line 666
>
> Warning: Invalid argument supplied for foreach() in /home/scott/
> public_html/cakeblog/cake/libs/controller/controller.php on line 666
>
> Notice: Trying to get property of non-object in /home/scott/
> public_html/cakeblog/cake/libs/controller/controller.php on line 801
>
> Warning: Invalid argument supplied for foreach() in /home/scott/
> public_html/cakeblog/cake/libs/controller/controller.php on line 801
>
> The table displayed in the view doesn't have the 'id' or 'title'
> column. What's wrong?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to