Skip to content

Suggestion: ActiveRecord::findAll() without $condition #20

@egorio

Description

@egorio

Sometimes you want to get all records from table (for example if it is a dictionary).

Each model has findAll($condition) method, but you can call it without condition.

I suggest modify Model::findAll($condition = null) to call it without $condition if you want.
Just Model::findAll();

For example:

$records = Dictionaty::findAll(['field' => 'value']);

// find all records the same way
$records = Dictionary::findAll();

For now it looks like:

$records = Dictionaty::findAll(['field' => 'value']);

// for now it is a different way
$records = Dictionary::find()->all();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions