Skip to content

Problem with properties/fields that contain an underscore #60758

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
thlaure opened this issue Jun 11, 2025 · 0 comments
Open

Problem with properties/fields that contain an underscore #60758

thlaure opened this issue Jun 11, 2025 · 0 comments

Comments

@thlaure
Copy link

thlaure commented Jun 11, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants