QueryBuilder - replace deprecated getAlias() by getAliases()[0]

well, except the case of no root alias should be handled by an exception in this case, not by using ``null`` as root alais (which is exactly what ``getRootAlias`` is doing for us here)