0

I would ask why am I getting error

 [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.

 ...

when I call

console  doctrine:schema:validate

There are my Entities: Rule

 /**
     * @ORM\OneToMany(targetEntity="RuleSettings",mappedBy="rules")
     */
    private $ruleSettings;

RuleSettings

  /**
     * @ORM\ManyToOne(targetEntity="Rule")
     * @ORM\JoinColumn(name="ruleId",nullable=false)
     */
    private $rule;

What problem do I have there?

Azamat Ahunjanov
  • 356
  • 2
  • 15

1 Answers1

0

mappedBy="rules" does not equal $rule

change to mappedBy="rule"

LBA
  • 3,859
  • 2
  • 21
  • 60