-
Notifications
You must be signed in to change notification settings - Fork 109
Closed
Description
@JsonUnwrapped
fails for HibernateProxy instances. They are serialized as if the @JsonUnwrapped
annotation was missing.
Work around:
Replace the object with its underlying implementation:
Hibernate.initialize(client);
this.client = (Client) ((HibernateProxy) client)
.getHibernateLazyInitializer()
.getImplementation();
Tested on the following dependencies:
[INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.8.0:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.0:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-core:jar:2.8.0:compile
[INFO] +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.8.0:compile
[INFO] +- com.fasterxml.jackson.datatype:jackson-datatype-hibernate5:jar:2.8.0:compile
[INFO] +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.8.0:compile
Metadata
Metadata
Assignees
Labels
No labels