Skip to content

Deserialize snake case JSON does not work for association fields #1591

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

Closed
spring-projects-issues opened this issue Apr 14, 2018 · 1 comment
Assignees
Labels
type: bug A general bug

Comments

@spring-projects-issues
Copy link

Julien Roy opened DATAREST-1232 and commented

When POST / PUT / PATCH entity that contains association field in snake case Json format, the association field is not mapped.

I think is due to an issue in PersistentEntityJackson2Module#AssociationUriResolvingDeserializerModifier class.

JSON body sample :

{ "first_name" : "Bilbo", "grand_father" : "/persons/1"}

Entity sample :

@Entity
public class Person {
@Id @GeneratedValue private Long id;
private String firstName;
@ManyToOne private Person grandFather;
}

Pull request proposed here : #291


Affects: 3.0.6 (Kay SR6)

@odrotbohm
Copy link
Member

This ticket came up in the context of #2165, and we think the original problem should be solved with the fix for that. Please give the snapshots a try if you manage to find the time.

@odrotbohm odrotbohm changed the title Deserialize snake case JSON does not work for association fields [DATAREST-1232] Deserialize snake case JSON does not work for association fields Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants