Skip to content

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

@spring-projects-issues

Description

@spring-projects-issues

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)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions