hi, folgende doctrine abfrage führe ich aus. $builder = Shopware()-\>Models()-\>createQueryBuilder(); $builder-\>select(array( 'orders', 'billing' )) -\>from('Shopware\Models\Order\Order', 'orders') -\>leftJoin('orders.billing', 'billing') -\>where('orders.number IS NOT NULL') -\>andWhere('orders.orderTime \>= 2015-09-05') -\>setFirstResult(0) -\>setMaxResults(5) -\>orderBy('orders.id', 'DESC'); $data = $builder-\>getQuery()-\>getArrayResult();
ausgabe: Array ( [0] =\> Array ( [id] =\> 13368 [number] =\> 41511 ... [billing] =\> Array ( [id] =\> 9557 [orderId] =\> 13368 [number] =\> 40197 ... ) ) [1] =\> Array ( [id] =\> 13367 [number] =\> 41510 ... [billing] =\> Array ( [id] =\> 9556 [orderId] =\> 13367 [number] =\> ... ) ) ... )
es sind sehr viele billing[number] leer warum? // edit stelle gerade fest das alle leer sind, die status 2 sind. -\>andWhere('orders.status = 2')