-
Notifications
You must be signed in to change notification settings - Fork 2
Doctrine ORM
Symftony edited this page Dec 10, 2017
·
3 revisions
/!\ ORM Expression doesn't support not and
not or
xor
These not supported operator was not allowed to use and the parser will throw UnsupportedTokenTypeException
use Doctrine\ORM\Query\Expr;
use Symftony\Xpression\Bridge\Doctrine\ORM\ExprAdapter;
use Symftony\Xpression\Parser;
QueryStringParser::correctServerQueryString();
$parser = new Parser(new ExprAdapter(new Expr()));
$expression = $parser->parse($_GET['query']);
$driver = new Driver();
$connection = new Connection(array(), $driver);
$results = $connection
->createQueryBuilder()
->setQueryArray($expression->getQuery())
->getQuery()
->execute();