FR: Support field-EntityView deserializatin for DTOs which are non-entity views #1898
Labels
component: entity-view
component: jackson
component: spring-data-webflux
component: spring-data-webmvc
component: spring-hateoas
kind: enhancement
worth: medium
Implementing this has a medium worth
Milestone
With
EntityViewAwareMappingJackson2HttpMessageConverter
BP supports (de)serialization of EntityViews (currently in MVC context only).This only works, when the actual top-level type is an EntityView such as
this will work for the top-level type
GroupIdView
and the field member of typeUserIdView
When submitting an dto like
This will not work, since
GroupDTO
is not a EntityView, thus it will be handled by the genericMappingJackson2HttpMessageConverter
which will fail to deserializemember
since the type is an interface.This FR suggest that we add deserializtion support for DTO's too. As discussed with @beikov this can be done by re-implementing
canRead
to act if it is an EV OR if callsuper().canRead()
opts in.The text was updated successfully, but these errors were encountered: