Skip to content

count should not be persisted to query #140

Description

@moreamazingnick
$models = Data::on($conn);

$good = $models->filter(Filter::equal('processed', 'y'))->count();

$bad = $models->filter(Filter::equal('processed', 'n'))->count();

this example gives $bad the same value as $good since it will not be evaluated after query adaption

if ($this->count === null) {

of course this would work:

$models = Data::on($conn);
$good = $models->filter(Filter::equal('processed', 'y'))->count();

$models = Data::on($conn);
$bad = $models->filter(Filter::equal('processed', 'n'))->count();

Best Regards
Nicolas

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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