Symfony Mapping Error: "The association EntityRule#ruleSettings refers to the owning side field EntityRuleSettings#rules which does not exist."

  doctrine-mapping, doctrine-orm, orm, symfony, symfony-4.4

I would ask why am I getting error

 [FAIL] The entity-class AppBundleEntityRule mapping is invalid:
 * The association AppBundleEntityRule#ruleSettings refers to the owning side field AppBundleEntityRuleSettings#rules which does not exist.

 [FAIL] The entity-class AppBundleEntityRuleSettings mapping is invalid:
 * The association AppBundleEntityRuleSettings#targets refers to the inverse side field AppBundleEntityTarget#rulesettings which does not exist.
 * The association AppBundleEntityRuleSettings#departments refers to the inverse side field AppBundleEntityDepartment#rulesettings which does not exist.
 * The association AppBundleEntityRuleSettings#ruleActions refers to the owning side field AppBundleEntityRuleAction#rulesettings which does not exist.

 ...

when I call

console  doctrine:schema:validate

There are my Entities:
Rule

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

RuleSettings

  /**
     * @ORMManyToOne(targetEntity="Rule")
     * @ORMJoinColumn(name="ruleId",nullable=false)
     */
    private $rule;

What problem do I have there?

Source: Symfony Questions

LEAVE A COMMENT