【发布时间】:2023-03-25 09:16:01
【问题描述】:
我会问我为什么会出错
[FAIL] The entity-class AppBundle\Entity\Rule mapping is invalid:
* The association AppBundle\Entity\Rule#ruleSettings refers to the owning side field AppBundle\Entity\RuleSettings#rules which does not exist.
[FAIL] The entity-class AppBundle\Entity\RuleSettings mapping is invalid:
* The association AppBundle\Entity\RuleSettings#targets refers to the inverse side field AppBundle\Entity\Target#rulesettings which does not exist.
* The association AppBundle\Entity\RuleSettings#departments refers to the inverse side field AppBundle\Entity\Department#rulesettings which does not exist.
* The association AppBundle\Entity\RuleSettings#ruleActions refers to the owning side field AppBundle\Entity\RuleAction#rulesettings which does not exist.
...
当我打电话时
console doctrine:schema:validate
有我的实体: 规则
/**
* @ORM\OneToMany(targetEntity="RuleSettings",mappedBy="rules")
*/
private $ruleSettings;
规则设置
/**
* @ORM\ManyToOne(targetEntity="Rule")
* @ORM\JoinColumn(name="ruleId",nullable=false)
*/
private $rule;
我有什么问题?
【问题讨论】:
标签: symfony orm doctrine-orm doctrine-mapping symfony-4.4