# REST API: GET LIST not in (ids) gibt einen Doctrine Query Fehler...

**URL:** <https://forum.shopware.com/t/rest-api-get-list-not-in-ids-gibt-einen-doctrine-query-fehler/58748>\
**Category:** Programmierung\
**Created:** [25. März 2019 um 11:24 UTC](https://forum.shopware.com/t/rest-api-get-list-not-in-ids-gibt-einen-doctrine-query-fehler/58748 "2019-03-25T11:24:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kipperlenny](https://avatars.discourse-cdn.com/v4/letter/k/b5e925/32.png) [@Kipperlenny](https://forum.shopware.com/u/Kipperlenny)\
**Post date:** [25. März 2019 um 11:24 UTC](https://forum.shopware.com/t/rest-api-get-list-not-in-ids-gibt-einen-doctrine-query-fehler/58748/1 "2019-03-25T11:24:32Z")

</div>

Nach einem großen Import, möchte ich alle Artikel die nicht im Import behandelt wurden inaktiv setzen, dazu hole ich eine Liste mit folgendem Code:

```
        $params = array(
            'filter' => array(
                array(
                    'property' => 'id',
                    'expression' => 'NOT IN',
                    'value' => $ids,
                ),
                array(
                    'property' => 'supplierID',
                    'value' => $this->supplierId,
                )
            )
        );
        
        $articles = $this->sw->get('articles', $params);

```

Die $params sehen so aus:

> array(1) {  
> &nbsp; [„filter“]=\>  
> &nbsp; array(2) {  
> &nbsp; &nbsp; [0]=\>  
> &nbsp; &nbsp; array(3) {  
> &nbsp; &nbsp; &nbsp; [„property“]=\>  
> &nbsp; &nbsp; &nbsp; string(2) „id“  
> &nbsp; &nbsp; &nbsp; [„expression“]=\>  
> &nbsp; &nbsp; &nbsp; string(6) „NOT IN“  
> &nbsp; &nbsp; &nbsp; [„value“]=\>  
> &nbsp; &nbsp; &nbsp; array(2) {  
> &nbsp; &nbsp; &nbsp; &nbsp; [0]=\>  
> &nbsp; &nbsp; &nbsp; &nbsp; int(1)  
> &nbsp; &nbsp; &nbsp; &nbsp; [1]=\>  
> &nbsp; &nbsp; &nbsp; &nbsp; int(2)  
> &nbsp; &nbsp; &nbsp; }  
> &nbsp; &nbsp; }  
> &nbsp; &nbsp; [1]=\>  
> &nbsp; &nbsp; array(2) {  
> &nbsp; &nbsp; &nbsp; [„property“]=\>  
> &nbsp; &nbsp; &nbsp; string(10) „supplierID“  
> &nbsp; &nbsp; &nbsp; [„value“]=\>  
> &nbsp; &nbsp; &nbsp; int(1)  
> &nbsp; &nbsp; }  
> &nbsp; }  
> }

Aber die API antwortet:

```
Fatal error: Uncaught Doctrine\ORM\Query\QueryException: SELECT article, mainDetail, attribute, mainDetail.lastStock FROM Shopware\Models\Article\Article article LEFT JOIN article.mainDetail mainDetail LEFT JOIN mainDetail.attribute attribute WHERE article.id NOT IN (:id5c98b870cb1a4) AND article.supplierID LIKE :supplierID5c98b870cb5a4 in /vendor/doctrine/orm/lib/Doctrine/ORM/Query/QueryException.php:41
Stack trace:
#0 /vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php(483): Doctrine\ORM\Query\QueryException::dqlError('SELECT article,...')
#1 /vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php(758): Doctrine\ORM\Query\Parser->semanticalError('line 0, col 241...', Array)
#2 /vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php(279): Doctrine\ORM\Query\Parser->processDeferredPathExpressions(Object(Doctrine\ORM\Query\AS in /vendor/doctrine/orm/lib/Doctrine/ORM/Query/QueryException.php on line 63

```

Wo liegt der Fehler?!
