You model should be in singular form, which mean that is should be
named "MetricLevel" not "MetricLevels", then CakePHP will ensure that
the correct table will be used.
Enjoy,
   John

On Apr 19, 9:08 am, xiaohouzi79 <[email protected]> wrote:
> Hi,
>
> I have one table metrics and another table metric_levels. In the
> Metric model I have $hasMany = 'MetricLevels' but anything inside the
> MetricLevels model is totally ignored.
>
> But, if I rename the model to 'Metric' and have $useTable =
> 'metric_levels' it works fine. I've tried all combinations, but none
> seem to work. I've tried plurals, singulars, underscores, nothing
> seems to work. The model is simply ignored and it just takes the value
> from the database.
>
> Any help is appreciated.
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
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

Reply via email to