View Single Post
  #1  
Old 03-12-2018, 02:48 AM
 
Soptareanu Alex Soptareanu Alex is offline
 

Member
  
Join Date: Sep 2016
Posts: 24
 

Question Query Builder in Xcart

Hello I need to retrive some order by shipping status. For that task I try to use query builder but I get some errors.
This is my query :
$aBackOrders = \XLite\Core\Database::getRepo('\XLite\Model\Order' )
->createQueryBuilder('o')
->andWhere('o.shipping_status_id = :id')
->setParameter('id', 4)
->getResult();
And this is the error that i get :
[Semantical Error] line 0, col 78 near 'shipping_status_id': Error: Class XLite\Model\Order has no field or association named shipping_status_id

What I'm doing wrong ?
__________________
alex
Reply With Quote