diff --git a/src/main/java/com/loafle/bridge/discoveryhost/DiscoveryHost.java b/src/main/java/com/loafle/bridge/discoveryhost/DiscoveryHost.java index ccc24fe..bca84a2 100644 --- a/src/main/java/com/loafle/bridge/discoveryhost/DiscoveryHost.java +++ b/src/main/java/com/loafle/bridge/discoveryhost/DiscoveryHost.java @@ -2,8 +2,11 @@ package com.loafle.bridge.discoveryhost; import com.loafle.bridge.discoveryport.DiscoveryPort; import com.loafle.bridge.discoveryzone.DiscoveryZone; +import org.hibernate.annotations.*; +import org.hibernate.annotations.CascadeType; import javax.persistence.*; +import javax.persistence.Entity; import java.util.Date; import java.util.List; @@ -47,6 +50,7 @@ public class DiscoveryHost { } @OneToMany(mappedBy = "host") + @Cascade(CascadeType.ALL) private List ports; public List getPorts() {