Cakephp with underscore table ignores model
Posted
by xiaohouzi79
on Stack Overflow
See other posts from Stack Overflow
or by xiaohouzi79
Published on 2010-04-19T06:10:43Z
Indexed on
2010/04/19
6:13 UTC
Read the original article
Hit count: 225
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.
© Stack Overflow or respective owner