Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Problem with properties/fields that contain an underscore #60758

Open
@thlaure

Description

@thlaure

Symfony version(s) affected

7.3.0

Description

When we create a DTO we want to map in an entity, if the entity contains a property containing an undescore in the name, the ObjectMapper doesn't recognize the field, throwing an error like this: "symfony object mapper Could not determine access type for property".
I fix it removing the underscore in the property name

How to reproduce

Create a DTO with the field you want to map to the field
Create a entity with a field containing an underscore.
Try to map the data from the DTO to the entity. If you want, give the same name to the DTO property and to the entity property

Possible Solution

Allow property name with underscore

Additional Context

No response

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