Conventions regarding people and Person
Hello everybody. I have a question regarding the convention within the CakePHP manual. At point 2.4.4 in the Manual for version 1.2.x it says that when you create a Model class called Person, the corresponding table in the database is/should be people. Now, it does state earlier in the manual that the database table name has to be the plural of the model class...but does CakePHP really work this way? Should it not be persons? I am not speaking from a What is correct in the English dictionary? type of way, rather from a programming view. Did CakePHP take all the plurals available in the dictionary and made sure to recognize: man - men mouse - mice person - people and every other plural form that does not abide by the rules? Anyhow, awaiting an answer about this. Cheers. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Conventions regarding people and Person
On Sun, Oct 5, 2008 at 9:47 AM, Sentinel [EMAIL PROTECTED] wrote: Hello everybody. I have a question regarding the convention within the CakePHP manual. At point 2.4.4 in the Manual for version 1.2.x it says that when you create a Model class called Person, the corresponding table in the database is/should be people. Now, it does state earlier in the manual that the database table name has to be the plural of the model class...but does CakePHP really work this way? Should it not be persons? I am not speaking from a What is correct in the English dictionary? type of way, rather from a programming view. Did CakePHP take all the plurals available in the dictionary and made sure to recognize: man - men mouse - mice person - people and every other plural form that does not abide by the rules? It does a lot of them http://api.cakephp.org/inflector_8php-source.html#l00077 and you can make more to add yourself Sam D --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Conventions regarding people and Person
Note that you can use the $useTable property in the model to explicitly define what table to use in case of doubt/ambiguity. http://manual.cakephp.org/view/436/useTable On Oct 5, 11:47 am, Sentinel [EMAIL PROTECTED] wrote: Hello everybody. I have a question regarding the convention within the CakePHP manual. At point 2.4.4 in the Manual for version 1.2.x it says that when you create a Model class called Person, the corresponding table in the database is/should be people. Now, it does state earlier in the manual that the database table name has to be the plural of the model class...but does CakePHP really work this way? Should it not be persons? I am not speaking from a What is correct in the English dictionary? type of way, rather from a programming view. Did CakePHP take all the plurals available in the dictionary and made sure to recognize: man - men mouse - mice person - people and every other plural form that does not abide by the rules? Anyhow, awaiting an answer about this. Cheers. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---