package refacrot

This commit is contained in:
geek 2016-11-17 11:47:44 +09:00
parent e8d27a8af3
commit 84bb955d2e

View File

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