-
Notifications
You must be signed in to change notification settings - Fork 109
Open
Labels
need-test-caseNeeds a test case (unit test or such) to proceedNeeds a test case (unit test or such) to proceed
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);
}
Metadata
Metadata
Assignees
Labels
need-test-caseNeeds a test case (unit test or such) to proceedNeeds a test case (unit test or such) to proceed