Hey everyone, I have set up CakePHP 1.2 beta on my host and am writing a CMS. I have set up two models, one called Menus and the other called Contents. Menus -> hasMany -> Contents, while Contents -> belongsTo - > Menus.
In my controller code, I am at the stage of validating my data against the two models. I have one page, mysite.com/admin/menus/add that allows the user to enter Menu information (eg. page title, stub, parent menu, etc) and another fieldset for the actual content (this is so that one menu can have different versions of content). In my controller code, I have as follows: $this->Menu->set($this->data); $this->Menu->validates(); $this->Menu->Content->set($this->data); $this->Menu->Content->validates(); ... which seems to make sense to me, models being first-char- capitalised and in singular form. This also follows for my user management module that I wrote, the model is always referenced as singular. However, when I execute this code, CakePHP is imperative that 'Content' should really be 'Contents'. Executing the above code gives me the following PHP error: Fatal error: Call to a member function on a non-object in /app/ controllers/menus_controller.php on line 130 Changing 'Content' to 'Contents' makes it all work. A part of me is feeling like I should just fix what's broke and who cares if it's theoretically wrong, but a larger part of me wants to make this work theoretically and practically as well (plus it's more poetic!). I have included a link to a paste of my inflections.php file, I tried to modify it so that I can force the singular of 'Contents' to be 'Content', but it doesn't seem to make any difference. http://bin.cakephp.org/view/905242165 Any ideas out there? TIA. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~----------~----~----~----~------~----~------~--~---