-1

这是我的查询:

$symptoms = $em->createQuery("SELECT p FROM QuestionnaireSigninBundle:TblSymptoms p where p.IsDeleted=0 ")->getArrayResult(); 

这是错误消息

[Semantical Error] line 0, col 62 near 'IsDeleted=0 ': Error: Class  
Questionnaire\SigninBundle\Entity\TblSymptoms has no field or association 
named IsDeleted 
4

1 回答 1

0

消息说您的实体TblSymptoms没有字段IsDeleted

可能是一种类型。在骆驼情况下,该字段应命名为isDeleted.

顺便说一句,在查询中直接设置值是一种不好的做法。

$query = $em->createQuery('SELECT p FROM QuestionnaireSigninBundle:TblSymptoms p where p.isDeleted = ?1');
$query->setParameter(0);
于 2012-11-24T13:15:21.127 回答