atk4/atk4 — pull request #84 by DarkSide666 (2012-08-09 16:22:13+00:00)
Title: Fix titleQuery SELECT with unique table alias

Before titleQuery function generated SELECT like this:
SELECT `name` FROM `t1` WHERE `t2`.`parent_id`=`t1`.`id`
this was ok in ordinary models, but not in hierarchial ones where t1=t2:
SELECT `name` FROM `t` WHERE `t`.`parent_id`=`t`.`id`

Now after this fix it'll be something like this with unique generated table alias t_2:
SELECT `name` FROM `t` `t_2` WHERE `t`.`parent_id`=`t_2`.`id`
which should be correct.

This fixes ATK4 issue #75 reported by me some time ago. No more ParentObject model walkaround is required.