| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Query Builder in Xcart | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
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 |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Query Builder in Xcart
Quote:
Your request should be as follows: Code:
Doctrine only works with properties in model class (in your case \XLite\Model\Order) and there is no property called 'shipping_status_id'. Instead you should work with 'shippingStatus' property and you can specify its value as ID (in my example) or as an entire \XLite\Model\Order\Status\Shipping object. Please, let me know if it helps. Tony
__________________
Found a bug in X-Cart? Post it to our bug tracker! Know how to make X-Cart better? Suggest an idea! |
|||||||||
|
#3
|
|||||||
|
|||||||
Re: Query Builder in Xcart
Quote:
__________________
alex |
|||||||
|
|||
X-Cart forums © 2001-2020
|