Re: Class and Model Naming Problems (wave becomes wafe)
On Tue, Aug 25, 2009 at 1:36 AM, Vijay Pandeyvijayh...@gmail.com wrote: Yes...thats trueIt is NOT a bug but a cake conventionall 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. I see. But I've said a bug 'cause wave/waves is a regular plural and wife/wives that's the irregular one[1] :-P But it's not a big deal at all. Best regards. [1] http://www.uri.edu/comm_service/cued_speech/plurals.html -- 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Class and Model Naming Problems (wave becomes wafe)
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 jeffreyr...@gmail.com 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 mfandr...@gmail.com wrote: On Fri, Aug 21, 2009 at 3:21 PM, JDRoppjeffreyr...@gmail.com 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Class and Model Naming Problems (wave becomes wafe)
Yes...thats trueIt is NOT a bug but a cake conventionall 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 nancy.milli...@gmail.com 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 jeffreyr...@gmail.com 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 mfandr...@gmail.com wrote: On Fri, Aug 21, 2009 at 3:21 PM, JDRoppjeffreyr...@gmail.com 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Class and Model Naming Problems (wave becomes wafe)
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 AffectedNum. 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. Thanks! Jeff --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Class and Model Naming Problems (wave becomes wafe)
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 mfandr...@gmail.com wrote: On Fri, Aug 21, 2009 at 3:21 PM, JDRoppjeffreyr...@gmail.com 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---