Skip to content

[Bug] Property "domain" does not exist in class "App\Entity\MyEntity" #31873

@Aerendir

Description

@Aerendir

Symfony version(s) affected: 4.3.0

Description
In one of my forms I receive this error:

Property "domain" does not exist in class "App\Entity\MyEntity"

Obviously it doesn't exist as the property is actually $domains.

So I have a method addDomain and a method removeDomain.

The problem is caused by the validation auto_mapping: if I disable it, the problem disappears

framework:
    validation:
        email_validation_mode: html5

        # Enables validator auto-mapping support.
        # For instance, basic validation constraints will be inferred from Doctrine's metadata.
        #auto_mapping:
        #    App\Entity\: []

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions