protected function getColumnFromSubQuery($class, $phpName, $failSilently = true)
    {
        $subQueryCriteria = $this->getSelectQuery($class);
        $tableMap = $subQueryCriteria->getTableMap();
        if ($tableMap->hasColumnByPhpName($phpName)) {
            $column = $tableMap->getColumnByPhpName($phpName);
            $realColumnName = $class.'.'.$column->getName();

            return [$column, $realColumnName];
        } elseif (isset($subQueryCriteria->asColumns[$phpName])) {
            // aliased column
            return [null, $class.'.'.$phpName];
        } elseif ($failSilently) {
            return [null, null];
        } else {
            throw new PropelException(sprintf('Unknown column "%s" in the subQuery with alias "%s".', $phpName, $class));
        }
    }