From 330ace9e7e37de44a69e188030352abd745f3088 Mon Sep 17 00:00:00 2001 From: jackdaw Date: Fri, 18 Nov 2016 11:29:10 +0900 Subject: [PATCH] nullable, --- .../java/com/loafle/bridge/discoveryport/DiscoveryPort.java | 2 +- .../com/loafle/bridge/discoveryport/ServiceScanHistory.java | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/loafle/bridge/discoveryport/DiscoveryPort.java b/src/main/java/com/loafle/bridge/discoveryport/DiscoveryPort.java index 9a4cf0c..88ee7d8 100644 --- a/src/main/java/com/loafle/bridge/discoveryport/DiscoveryPort.java +++ b/src/main/java/com/loafle/bridge/discoveryport/DiscoveryPort.java @@ -17,7 +17,7 @@ public class DiscoveryPort { private long id; @ManyToOne - @JoinColumn + @JoinColumn(nullable = false) @JsonIgnore private DiscoveryHost host; public DiscoveryHost getHost() { diff --git a/src/main/java/com/loafle/bridge/discoveryport/ServiceScanHistory.java b/src/main/java/com/loafle/bridge/discoveryport/ServiceScanHistory.java index 5922821..be5dbde 100644 --- a/src/main/java/com/loafle/bridge/discoveryport/ServiceScanHistory.java +++ b/src/main/java/com/loafle/bridge/discoveryport/ServiceScanHistory.java @@ -21,8 +21,8 @@ public class ServiceScanHistory { @Temporal(TemporalType.TIMESTAMP) private Date createDate; - @ManyToOne(fetch = FetchType.LAZY) - @JoinColumn + @ManyToOne + @JoinColumn(nullable = false) @JsonIgnore private DiscoveryPort port; @@ -34,8 +34,6 @@ public class ServiceScanHistory { @Enumerated(EnumType.STRING) private DirectionType direction; - - @Lob @Column(nullable = false) private byte[] packet;