luisdias / CakePHP-Report-Manager-Plugin

CakePHP 2.x Report Manager Plugin
MIT License
42 stars 22 forks source link

use className instead of key alias to load associated models #8

Closed netors closed 11 years ago

netors commented 11 years ago

currently, if you use an alias (association key) that is different from the model name, it does not work, because it is using the key to load the data from the associated model, instead of using the className

this fixes the issue of using an association with an alias that is different than the className

the plug-in will load the associated model correctly by using the className instead of the defined alias in the key of the association