Yes...thats true....It is NOT a bug but a "cake convention"....all plurals ending in "ves" are converted in "fe" to make singular.
To instruct cake not to do that...just add the entri in $irregularPlurals at app/config/inflector.php as Marcelo says. Regards, Vijay On Aug 24, 10:48 pm, Nancy <[email protected]> wrote: > This isn't going to help but I bet maybe it uses the the same rules > for waves/wafe as it does for wives/wife. :D > > On Aug 21, 12:10 pm, JDRopp <[email protected]> wrote: > > > Thanks Marcelo for pointing to the relevant code. > > > I decided to change the model, table, and controller names instead. > > > I'll submit the defect to Cake. > > > On Aug 21, 12:01 pm, Marcelo Andrade <[email protected]> wrote: > > > > 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 -~----------~----~----~----~------~----~------~--~---
