Commit 8a71f3a5 authored by Michael Ritter's avatar Michael Ritter
Browse files

Ignore PeerCollections when creating json

parent 92cae73f
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
package edu.umiacs.ace.monitor.core; package edu.umiacs.ace.monitor.core;
import com.fasterxml.jackson.annotation.JsonIgnore;
import edu.umiacs.ace.monitor.peers.PeerCollection; import edu.umiacs.ace.monitor.peers.PeerCollection;
import edu.umiacs.util.Argument; import edu.umiacs.util.Argument;
...@@ -50,7 +51,6 @@ import javax.persistence.OneToMany; ...@@ -50,7 +51,6 @@ import javax.persistence.OneToMany;
import javax.persistence.Table; import javax.persistence.Table;
import javax.persistence.Temporal; import javax.persistence.Temporal;
import javax.persistence.TemporalType; import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -79,11 +79,11 @@ import java.util.Map; ...@@ -79,11 +79,11 @@ import java.util.Map;
@NamedQuery(name = "Collection.getCollectionsInGroup", query = @NamedQuery(name = "Collection.getCollectionsInGroup", query =
"SELECT c FROM Collection c WHERE c.group = :group") "SELECT c FROM Collection c WHERE c.group = :group")
}) })
@XmlRootElement
public class Collection implements Serializable { public class Collection implements Serializable {
@OneToMany(mappedBy = "parent", cascade = CascadeType.ALL) @OneToMany(mappedBy = "parent", cascade = CascadeType.ALL)
private List<PeerCollection> peerCollections; private List<PeerCollection> peerCollections;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
...@@ -134,6 +134,7 @@ public class Collection implements Serializable { ...@@ -134,6 +134,7 @@ public class Collection implements Serializable {
this.peerCollections = peerCollections; this.peerCollections = peerCollections;
} }
@JsonIgnore
public List<PeerCollection> getPeerCollections() { public List<PeerCollection> getPeerCollections() {
return peerCollections; return peerCollections;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment