More info on the problem...

So I have a Filter model and a FilterCriterion model.  A Filter hasMany FilterCriterion and a FilterCriterion belongs to a Filter

If I load the Filters controller it comes up fine if I have 'filter_criterion' => 'filter_criteria' in the irregularPlurals array in inflections.php

But when I click on the controller for filter_criteria it asks for the model 'FilterCriterium'

If I remove the entry from inflections.php the Filters controller will complain about not having access to a table called 'filter_criterions'

So it seems I either have something confused or wrong in the inflections.php file or for some reason the inflection is not working correctly when trying to go from plural to non-plural.  It seems to load ok (not tested 100% yet) when going from non-plural to plural.

Thanks

On 6/30/06, John Zimmerman [gmail] <[EMAIL PROTECTED]> wrote:
I have a little bit of a plurals problem.

The setup I am trying to implement here is the following:

  • Model: filter_criterion.php
  • Table: filter_criteria
  • Controller: filter_criteria_controller.php
What happens when accessing the hostname/filter_criteria url is that it says I need a model named 'FilterCriterium' but that is the wrong singular form because it should be 'FilterCriterion'.

So I have edited app/config/inflections.php and added an entry to irregular plurals 'criterion' => 'criteria'.  I have also tried various forms here with a filter prefix.

But basically it is not picking it up.  I am assuming that it has something to do with my using 'filter_' in front of the controller/table/model.

Every time it asks for a model named 'FilterCriterium'.

Any suggestions?


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

  • Plurals Problem John Zimmerman [gmail]
    • Re: Plurals Problem John Zimmerman [gmail]

Reply via email to