Open
Description
I think it's similar issue #73
With Spring along @JSONVIEW all Lazy fields will be initiated and serialized,
but when integrate hibernate5 module, the returned value is null (example relEntity return value is null) .
@Entity
@Table(name = "my_table")
public class MyEntity {
...
@ManyToOne(fetch = FetchType.LAZY, optional = false)
@JsonView(Views.Public.class)
private RelatedEntity relEntity;
...
}
Call from some Spring Rest controller:
@JsonView(Views.Public.class)
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
public MyEntity getObject(@PathVariable(name = "id") UUID id) {
return service.findByUuid(id);
}