public static function findBySql($nativeSql, $params = array())
{
$meta = static::metaInstance();
$results = $meta->_modelDefinition->db->query($nativeSql, Arrays::toArray($params))->fetchAll();
return Arrays::map($results, function ($row) use($meta) {
return $meta->newInstance($row);
});
}