Uncaught PHP Exception Doctrine \ ORM \ Query \ QueryException: "[Semantic error]?

I am trying to create a search box for a page with rejected transactions in our web application project, I am using the symfony2 framework, I am stuck, there was an error message,

'[Semantic error] line 0, col 235 next to' b JOIN b.ediAk403ErrorCodes ': Error: The class matrix \ MatrixEdiBundle \ Entity \ EdiTransaction does not have an association with the name edi997Details'

and

'CRITICAL - Untrained doctrine of exceptions PHP \ ORM \ Query \ QueryException: "[Semantical Error] line 0, col 235 next to' b JOIN b.ediAk403ErrorCodes': error: Class matrix \ MatrixEdiBundle \ Entity \ EdiTransaction has no association with the name edi997Dets "on /tmxpage/apache/htdocsEDI/Editracker/vendor/doctrine/orm/lib/Doctrine/ORM/Query/QueryException.php line 63 '

here is my code for this (in my repository):

public function getDetails($gsNumber, $senderId, $receiverId, $page = 1, $limit = 5 ){

    $em = $this->getEntityManager();

    $query = $em->createQuery(

        'SELECT partial a.{ediTransactionId, senderId, receiverId, gsNumber, isaNumber, fileName },

        partial b.{errorCodeId, noOfTrans},

        partial c.{errorCode, condition}

        FROM MatrixEdiBundle:EdiTransaction a

        JOIN a.edi997Details b

        JOIN b.ediAk403ErrorCodes c

        WHERE b.errorCodeId != 1

        AND a.flag = 1

        AND a.gsNumber LIKE :gsNumber

        AND a.senderId LIKE :senderId

        AND a.recieverId LIKE :receiverId')

        ->setParameter('gsNumber', "%gsNumber%")

        ->setParameter('senderId', "%senderId%")

        ->setParameter('receiverId'ssss, "%receiverId%")

        ->setFirstResult(($page-1)*$limit)

        ->setMaxResults($limit);



        $paginator = new Paginator($query, $fetchJoinCollection = false );

        $paginator->setUseOutputWalkers(false);


    return $paginator;
}

and here is my entity code for talble ediAk403ErrorCodes:

class EdiAk403ErrorCodes
{
  /**
  * @var string
  *
  * @ORM\Column(name="condition", type="string", length=50,  nullable=false)
  */
 private $condition;

 /**
 * @var integer
 *
 * @ORM\Column(name="error_code", type="integer")
 * @ORM\Id
 * @ORM\GeneratedValue(strategy="IDENTITY")
 */
 private $errorCode;

 /**
 * Set condition
 *
 * @param string $condition
 * @return EdiAk403ErrorCodes
 */

 public function setCondition($condition)
 {
    $this->condition = $condition;

    return $this;
 }

 /**
 * Get condition
 *
 * @return string 
 */
 public function getCondition()
 {
    return $this->condition;
 }

 /**
 * Get errorCode
 *
 * @return integer 
 */
 public function getErrorCode()
 {
    return $this->errorCode;
 }

 /**
 * Get edi997Details
 *
 * @return \Matrix\MatrixEdiBundle\Entity\Edi997Details
 */
 public function getEdi997Details()
 {
    return $this->edi997Details;
 }

}
+4
source share
2 answers

, Entity EdiTransaction EdiAk403ErrorCodes. EdiTransaction :

EdiTransaction

/**
 * @ORM\ManyToOne(targetEntity="Matrix\MatrixEdiBundle\Entity\Edi997Details", inversedBy="editTransactions")
 * @ORM\JoinColumn(name="edit_details_id", referencedColumnName="id")
 */
private $edi997Details;

+3

. MatrixEdiBundle: EdiTransaction a. , a.edi997Details , . , , , :

    FROM MatrixEdiBundle:EdiTransaction a

    JOIN edi997Details b

    JOIN ediAk403ErrorCodes c
0

All Articles