what's the difference between model->alias and model->name in CakePHP?
cakephp, php
Solution
I'm guessing, but an alias could be the assigned value when you have a relationship between a model and another and you give the associated model a name not equal to that of the class.
For example:
$hasMany = array('UserNew' => array('className' => 'User'));
In that case, you're using the model that's actually called User, but you're referencing it as 'UserNew'.
Problem
`alias` and `name` are both properties in cake models. They seem to be similar, but since both of them exist, there must be a difference. What is it?