mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-17 00:19:31 +00:00
Use a two step approach to retrieve part tables
This allows us to combine the fast filtering with the fetch joins, which should speed up the datatables a lot.
This commit is contained in:
parent
b8b9a416ac
commit
4c4501073c
3 changed files with 253 additions and 37 deletions
|
|
@ -41,9 +41,9 @@ class LessThanDesiredConstraint extends BooleanConstraint
|
|||
|
||||
//If value is true, we want to filter for parts with stock < desired stock
|
||||
if ($this->value) {
|
||||
$queryBuilder->andHaving('amountSum < part.minamount');
|
||||
$queryBuilder->andHaving('amountSum < minamount');
|
||||
} else {
|
||||
$queryBuilder->andHaving('amountSum >= part.minamount');
|
||||
$queryBuilder->andHaving('amountSum >= minamount');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue