Skip to content

Commit

Permalink
change json type to use hypersistence library
Browse files Browse the repository at this point in the history
  • Loading branch information
mbussolotto committed Aug 19, 2024
1 parent 2821d64 commit 3b8f39b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 1 addition & 4 deletions java/code/src/com/redhat/rhn/domain/server/Pillar.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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<String, Object> pillar = new TreeMap<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -96,13 +98,13 @@ public CoCoAttestationStatus getStatus() {
return status;
}

@Type(type = "json")
@Type(JsonType.class)
@Column(columnDefinition = "jsonb", name = "in_data")
public Map<String, Object> getInData() {
return inData;
}

@Type(type = "json")
@Type(JsonType.class)
@Column(columnDefinition = "jsonb", name = "out_data")
public Map<String, Object> getOutData() {
return outData;
Expand Down

0 comments on commit 3b8f39b

Please sign in to comment.