Skip to content
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

[Symfony] DoctrineObjectorConstructor always creates new entity because of camel case to snake case conversion #734

Closed
asgardia7 opened this issue Mar 22, 2017 · 1 comment

Comments

@asgardia7
Copy link

asgardia7 commented Mar 22, 2017

Hello,

I am deserializing using
jms_serializer.object_constructor: alias: jms_serializer.doctrine_object_constructor.

Always new entity is generated instead of updated entity initaly loaded from database because this test fails Identifiers test . Debugging it, I've seen the identifier is not recognized because it was originally idPlanification while after serialization and coming back from AJAX call, it becomes id_planification.

It's ok to convert camel case to snake case through serialization, but shouldn't this handled automatically through deserialization if so?
Or how can I automatically transform back my JSON string to inital camel case before it gets handled by the DoctrineObjectorConstructor

Thanks,

@asgardia7 asgardia7 changed the title Symfony DoctrineObjectorConstructor always create new entity because of camel case to snake case conversion issue Symfony DoctrineObjectorConstructor always create new entity because of camel case to snake case conversion Mar 22, 2017
@asgardia7 asgardia7 changed the title Symfony DoctrineObjectorConstructor always create new entity because of camel case to snake case conversion [Symfony] DoctrineObjectorConstructor always create new entity because of camel case to snake case conversion Mar 22, 2017
@asgardia7 asgardia7 changed the title [Symfony] DoctrineObjectorConstructor always create new entity because of camel case to snake case conversion [Symfony] DoctrineObjectorConstructor always creates new entity because of camel case to snake case conversion Mar 22, 2017
@goetas goetas added the bug label Apr 3, 2017
@goetas goetas added the bug label May 23, 2017
@goetas
Copy link
Collaborator

goetas commented May 25, 2018

fixed in #951

@goetas goetas closed this as completed May 25, 2018
@goetas goetas added this to the 1.12.0 milestone May 25, 2018
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

2 participants