mysql - Uncaught PHP Exception Doctrine\ORM\Query\QueryException: "[Semantical Error] line? -


i trying create search field rejected transactions page in our web application project, i'm using symfony2 framework, i'm stuck coz there error saying,

'[semantical error] line 0, col 235 near 'b join b.ediak403errorcodes': error: class matrix\matrixedibundle\entity\editransaction has no association named edi997details'

and

'critical - uncaught php exception doctrine\orm\query\queryexception: "[semantical error] line 0, col 235 near 'b join b.ediak403errorcodes': error: class matrix\matrixedibundle\entity\editransaction has no association named edi997details" @ /tmxpage/apache/htdocsedi/editracker/vendor/doctrine/orm/lib/doctrine/orm/query/queryexception.php line 63 '

here code (in 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}          matrixedibundle:editransaction          join a.edi997details b          join b.ediak403errorcodes c          b.errorcodeid != 1          , a.flag = 1          , a.gsnumber :gsnumber          , a.senderid :senderid          , a.recieverid :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 entity code 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;  }   /**  * condition  *  * @return string   */  public function getcondition()  {     return $this->condition;  }   /**  * errorcode  *  * @return integer   */  public function geterrorcode()  {     return $this->errorcode;  }   /**  * edi997details  *  * @return \matrix\matrixedibundle\entity\edi997details  */  public function getedi997details()  {     return $this->edi997details;  }  } 

seems entity class editransaction don't have explicit doctrine relation table ediak403errorcodes. try adding field definition correct annotation in editransaction class follow:

editransaction

/**  * @orm\manytoone(targetentity="matrix\matrixedibundle\entity\edi997details", inversedby="edittransactions")  * @orm\joincolumn(name="edit_details_id", referencedcolumnname="id")  */ private $edi997details; 

hope help


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -