You can add rules for the inflector class in your app/config/bootstrap.php
file.
For example, my app has a few relational tables that refer to events rather
than entities (selected, mated, planted, treated).
These models I do not want pluralized, so I add the following line to end
of bootstrap.php and model/class/etc names remain unchanged.
Inflector::rules('plural', array('uninflected' => array('selected', 'mated',
'planted', 'treated')));
McS
On Tuesday, 9 September 2014 03:34:15 UTC-4, MarkB wrote:
>
> Hi,
>
> This is not a support request, more of a WTF?
>
> I'm ultra new to CakePHP and I just built my first app yesterday, loosely
> based on the Blog Tutorial.
>
> It is centred around the processing and management of proposal application
> forms for lectures at a conference, so I called my model 'Apply'. I
> followed naming conventions and so set up my ApplysController and Applys
> view folder etc etc etc.
>
> I naturally called my database table 'applys', but when I run my app at
> www.example.com/applys it threw up an error message saying it couldn't
> find the database 'applies'.
>
> Er... wow! How did it know? Annoying, but impressive.
>
> Regards,
> MarkB.
>
> PS: I think it took me less time to build my app than hand code the 20
> field HTML form for the application. I was expecting to be spending the
> rest of the week writing the code to validate it, process it and write to
> database securely (something I'm not too confident about!). As a
> cut'n'paste programming web designer with fumbling knowledge of PHP and
> complete cluelessness regarding OOP, I wish I had looked at using a
> framework years ago. I think CakePHP is going to open up a whole new world
> to me.
>
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.