public static function cast($list, $model)
    {
        if (!$list) {
            return $list;
        }

        //Apply cast entry to each entry
        foreach ($list as $k => &$v) {
            $v= self::castEntry($v, $model);
        }

        return $list;
    }