I try define function findByRawSql as below
public static function findByRawSql($conditions, $params = null)
{
// instance class name
$instance_class_name = $this->getSource();
// A raw SQL statement
$sql = "SELECT * FROM $instance_class_name WHERE $conditions";
// Base model
$model = new $instance_class_name();
// Execute the query
return new Resultset(null, $model, $model->getReadConnection()->query($sql, $params));
}
But, $this->getSource() is error in static function