1
The way below works correctly:
$qb->select('partial t.{id,nsu,status,message}, partial u.{id,shortName,email} as user')
->from('GatewayBundle:Transaction', 't')
->join('GatewayBundle:User', 'u')
->where('u.id = t.user');
When I add another join
, results in a error syntax:
ERROR - [Syntax Error] line 0, col 461: Error:Expected Literal, got 'JOIN' 500 Internal Server Error - Queryexception
$qb->select('partial t.{id,nsu,status,message}, partial u.{id,shortName,email} as user, partial p.{id} as partner')
->from('GatewayBundle:Transaction', 't')
->join('GatewayBundle:User', 'u')
->join('GatewayBundle:Partner', 'p')
->where('u.id = t.user')
->andWhere('p.id = t.partner');
What is the correct syntax for this type of query?
If it worked, don’t forget to validate your own answer :)
– Rodrigo Rigotti