diff --git a/java/code/src/com/redhat/rhn/domain/server/Pillar.java b/java/code/src/com/redhat/rhn/domain/server/Pillar.java index 9b97251ed1ca..91c887fccb51 100644 --- a/java/code/src/com/redhat/rhn/domain/server/Pillar.java +++ b/java/code/src/com/redhat/rhn/domain/server/Pillar.java @@ -48,9 +48,6 @@ * https://github.com/uyuni-project/uyuni-rfc/pull/51 */ -@TypeDefs({ - @TypeDef(name = "json", typeClass = JsonType.class) -}) @Entity @Table(name = "suseSaltPillar") public class Pillar implements Identifiable { @@ -76,7 +73,7 @@ public class Pillar implements Identifiable { @Column(name = "category") private String category; - @Type(type = "json") + @Type(JsonType.class) @Column(columnDefinition = "jsonb") private Map pillar = new TreeMap<>(); diff --git a/java/code/src/com/suse/manager/model/attestation/ServerCoCoAttestationReport.java b/java/code/src/com/suse/manager/model/attestation/ServerCoCoAttestationReport.java index 8229bce4fc4a..a64b5b8f60e2 100644 --- a/java/code/src/com/suse/manager/model/attestation/ServerCoCoAttestationReport.java +++ b/java/code/src/com/suse/manager/model/attestation/ServerCoCoAttestationReport.java @@ -18,6 +18,8 @@ import com.redhat.rhn.domain.action.Action; import com.redhat.rhn.domain.server.Server; +import io.hypersistence.utils.hibernate.type.json.JsonType; + import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; import org.hibernate.annotations.Type; @@ -96,13 +98,13 @@ public CoCoAttestationStatus getStatus() { return status; } - @Type(type = "json") + @Type(JsonType.class) @Column(columnDefinition = "jsonb", name = "in_data") public Map getInData() { return inData; } - @Type(type = "json") + @Type(JsonType.class) @Column(columnDefinition = "jsonb", name = "out_data") public Map getOutData() { return outData;