I get interesting issue with getCollection method and my extended modUser class.
The problem is in class name.
in Schema i have
<object class="LslExtUser" table="users" extends="modUser">
!!! the class name first letter is capital
lslextuser.class.php file has:
class LslExtUser extends modUser {
function __construct(xPDO & $xpdo){
parent:: __construct($xpdo);
$this->set('class_key','LslExtUser');
}
}
!!! class key also with first capital letter
and now, when i call
... modx->getCollection('LslExtUser')
i get in log
(ERROR @ /index.php) Instantiated a derived class modUser that is not a subclass of the requested class LslExtUser
and no data.
Then, i change
getCollection('LslExtUser')
to
getCollection('lslExtUser')
and then i get a correct result with data from DB tables, but log file has next
(WARN @ /index.php) Could not load metadata map extra/mysql/lslextuser.map.inc.php for class lslExtUser from extra.mysql.lslextuser
All files are exists. Did clear cache in a manager, delete all data from cache folder, relogin to web context and manager context, rebuild schema.... still the same
Actually, it`s working, but look that something wrong, if i get WARN in a log. Maybe i miss something?!
Revo 2.2.0-pl2