Created
March 26, 2013 13:00
-
-
Save umpirsky/5245174 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Sylius\Bundle\CartBundle\Entity; | |
use Sylius\Bundle\ResourceBundle\Doctrine\ORM\EntityRepository; | |
class CartRepository extends EntityRepository | |
{ | |
protected function getQueryBuilder() | |
{ | |
return parent::getQueryBuilder() | |
->select('cart, item') | |
->leftJoin('cart.items', 'item') | |
; | |
} | |
protected function getAlias() | |
{ | |
return 'cart'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment