Symfony2 - 实体和检索信息之间的语义错误关系
我想做,
$this->getEntityManager()
->createQuery(' SELECT P.*
FROM MyNameSpaceProfileBundle:Tutor T
JOIN MyNameSpaceProfileBundle:Person Pe
JOIN MyNameSpaceMediaBundle:KidContent KC
JOIN MyNameSpaceMediaBundle:Post P
WHERE T.id = :id'
)->setParameter('id', $pId);
但我有这样的错误:
[语义错误]第 0 行,第 128 列“Pe”附近:错误:识别 变量 MyNameSpaceProfileBundle:连接路径表达式中使用的人员 但之前没有定义。 500 内部服务器错误 - QueryException
我已按照 symfony2 网站上的教程进行操作。
有什么帮助吗? 再见,
我不知道
I want to make
$this->getEntityManager()
->createQuery(' SELECT P.*
FROM MyNameSpaceProfileBundle:Tutor T
JOIN MyNameSpaceProfileBundle:Person Pe
JOIN MyNameSpaceMediaBundle:KidContent KC
JOIN MyNameSpaceMediaBundle:Post P
WHERE T.id = :id'
)->setParameter('id', $pId);
but I have this kind of error:
[Semantical Error] line 0, col 128 near 'Pe ': Error: Identification
Variable MyNameSpaceProfileBundle:Person used in join path expression
but was not defined before. 500 Internal Server Error - QueryException
I have followed the tutorial from symfony2 website.
ANY help please?
See ya
I have no idea
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试这个可以让它工作:
Trying this makes it work: