public static function setConnection($name, PropelPDO $con, $mode = Propel::CONNECTION_WRITE)
    {
        if ($name === null) {
            $name = self::getDefaultDB();
        }
        if ($mode == Propel::CONNECTION_READ) {
            self::$connectionMap[$name]['slave'] = $con;
        } else {
            self::$connectionMap[$name]['master'] = $con;
        }
    }