Bruno17 / MIGX

MIGX for revo 2.2 and above
83 stars 78 forks source link

Fix alias in getSelectColumns when using MODX3 classes #394

Closed sdrenth closed 1 year ago

sdrenth commented 2 years ago

This fixes the alias in getSelectColumns when using MODX3 classes.

Before the query would result in:

SELECT `\Sterc\Site\Model\Logo`.`id`, `\Sterc\Site\Model\Logo`.`title`, `\Sterc\Site\Model\Logo`.`url`, `\Sterc\Site\Model\Logo`.`logo`, `\Sterc\Site\Model\Logo`.`default`, `\Sterc\Site\Model\Logo`.`active` FROM `6sn7rm_sterc_logo` AS `Logo` ORDER BY id ASC LIMIT 10 

After the fix it results in:

SELECT `Logo`.`id`, `Logo`.`title`, `Logo`.`url`, `Logo`.`logo`, `Logo`.`default`, `Logo`.`active` FROM `6sn7rm_sterc_logo` AS `Logo` ORDER BY id ASC LIMIT 10