【问题标题】:Cannot join entities with no error无法无错误地加入实体
【发布时间】:2018-08-22 02:01:56
【问题描述】:

试图在两个实体之间建立关系。

用 phpmyadmin 调查显示他们的表之间没有链接。

/*
 * @ORM\OneToOne(targetEntity="Otherentity")
 */
private $otherentity;

代替:

/**
 * @ORM\OneToOne(targetEntity="Otherentity")
 */
private $otherentity;

即使检查coding standards 也没有帮助我。

【问题讨论】:

    标签: doctrine-orm entity-relationship symfony-2.8


    【解决方案1】:

    找到答案:评论结构本身有错别字。

    在搜索了几十个松散相关的主题和教程后,我不得不复制粘贴现有的关系并逐字替换......发现/**是强制性的。

    很容易被误认为/*。并且没有任何警告。

    希望对任何人都有帮助(至少我自己,几年后会再次发生)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-07-22
      相关资源
      最近更新 更多