nextras / orm

Orm with clean object design, smart relationship loading and powerful collections.
https://nextras.org/orm
MIT License
309 stars 59 forks source link

Missing HEAVY clause detection to ValueExpression aggregation #697

Closed hrach closed 3 weeks ago

hrach commented 3 weeks ago

Found one more, hopefully not a big deal. Just like the first one, AND and OR produce identical query, only correct for AND.

$this->model->books->findBy([
  ICollection::OR,
  ['title' => 'Book 1'],
  [ICollection::AND, new NoneAggregator, 'tags->id' => 3],
]);
$this->model->books->findBy([
  ICollection::AND,
  ['title' => 'Book 1'],
  [ICollection::AND, new NoneAggregator, 'tags->id' => 3],
]);

Originally posted by @stepapo in #690