我有这样的代码,symfony中的错误说:
[语义错误]第0行,第221行靠近'b
WHERE':错误:Class Matrix \ MatrixEdiBundle \ Entity \ EdiTransaction没有名为ediTransaction的关联
这是我的代码:
class Edi997DetailsRepository extends EntityRepository
{
public function getDetails($gsNumber, $senderId, $receiverId,$page = 1, $limit = 5 ){
$em = $this->getEntityManager();
$query = $em->createQuery(
'SELECT partial a.{ediTransactionId, gsNumber, senderId, receiverId, isaNumber, fileName},
partial b.{ediTransactionId}
FROM MatrixEdiBundle:EdiTransaction a
JOIN a.ediTransaction b
WHERE b.errorCodeId != 1
AND a.flag = 1
AND a.gsNumber LIKE :gsNumber
AND a.senderId LIKE :senderId
AND a.receiverId LIKE :receiverId
')
->setFirstResult(($page-1)*$limit)
->setMaxResults($limit);
$paginator = new Paginator($query, $fetchJoinCollection = false );
$paginator->setUseOutputWalkers(false);
return $paginator;
}
}
?>