On Fri, Aug 21, 2009 at 3:21 PM, JDRopp<[email protected]> wrote:
>
> I've just started working with Cake and have been impressed so far.
>
> I've created:
> A table called "waves"
> A model class called "wave" (wave.php)
> A controller class called "WavesController" (waves_controller.php)
>
> Somehow "wave" turns into "wafe" when SQL is generated.  For example:
> Nr      Query   Error   Affected        Num. rows       Took (ms)
> 1       DESCRIBE `waves`                3       3       38
> 2       SELECT COUNT(*) AS `count` FROM `waves` AS `Wafe` WHERE `Wafe`.`id`
> = 1             1       1       0
> 3       SELECT `Wafe`.`id`, `Wafe`.`name`, `Wafe`.`deployment_date` FROM
> `waves` AS `Wafe` WHERE `Wafe`.`id` = 1 LIMIT 1         1       1       0
>
> Any idea what's going on here?  I've searched and found no "wafe"
> typos in my code.


Not sure, but It seems like a bug in inflector.

Try to add wave/waves to the $irregularPlurals at app/config/inflector.php

If it not works, I'm afraid you'll have to define the $useTable = 'waves'; in
your Wave model.

Best regards.

--
MARCELO DE F. ANDRADE
Belem, PA, Amazonia, Brazil
Linux User #221105

http://mfandrade.wordpress.com

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

Reply via email to