# Orders nach transaction -  und delivery - state filtern über DAL

**URL:** <https://forum.shopware.com/t/orders-nach-transaction-und-delivery-state-filtern-uber-dal/71944>\
**Category:** Programmierung\
**Created:** [7. Januar 2021 um 14:42 UTC](https://forum.shopware.com/t/orders-nach-transaction-und-delivery-state-filtern-uber-dal/71944 "2021-01-07T14:42:25Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Michael\_Telgmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/michael_telgmann/32/20289_2.png) [@Michael\_Telgmann](https://forum.shopware.com/u/Michael_Telgmann)\
**Post date:** [7. Januar 2021 um 15:12 UTC](https://forum.shopware.com/t/orders-nach-transaction-und-delivery-state-filtern-uber-dal/71944/2 "2021-01-07T15:12:09Z")

</div>

Hallo @webjohn‍,

du kannst einfach im EqualsFilter die Associations voranstellen und kannst dann jedes Feld der Assoziations-Entity auswählen:

```
$criteria = new Criteria();
$criteria->addFilter(
    new EqualsFilter('currency_factor', 1)
);
$criteria->addAssociation('deliveries');
$criteria->addAssociation('transactions');
$criteria->addFilter(new EqualsFilter('transactions.stateId', $orderTransactionStateId));
$orders = $this->orderRepository->search(
    $criteria,
    Context::createDefaultContext()
);

```

Dies lässt sich beliebig tief verschachteln

Viele Grüße aus Schöppingen

![cool](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/86c57fbace799dd4eb1f1b8a2d3bdc1733f0aea1.png "cool")&nbsp;Michael Telgmann

---

_[View the full topic](https://forum.shopware.com/t/orders-nach-transaction-und-delivery-state-filtern-uber-dal/71944)._
