mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-24 10:49:00 +02:00
Use having clause for part amountSum filter constraint
This fixes issue #218
This commit is contained in:
parent
ccb0ac63e1
commit
2d85734703
1 changed files with 2 additions and 1 deletions
|
@ -105,7 +105,8 @@ class PartFilter implements FilterInterface
|
|||
This seems to be related to the fact, that PDO does not have an float parameter type and using string type does not work in this situation (at least in SQLite)
|
||||
TODO: Find a better solution here
|
||||
*/
|
||||
$this->amountSum = new IntConstraint('amountSum');
|
||||
//We have to use Having here, as we use an alias column which is not supported on the where clause and would result in an error
|
||||
$this->amountSum = (new IntConstraint('amountSum'))->useHaving();
|
||||
$this->lotCount = new IntConstraint('COUNT(partLots)');
|
||||
|
||||
$this->storelocation = new EntityConstraint($nodesListBuilder, Storelocation::class, 'partLots.storage_location');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue