This commit is contained in:
jackdaw 2016-11-17 11:33:35 +09:00
parent 19fab20672
commit e8d27a8af3
3 changed files with 6 additions and 6 deletions

View File

@ -24,8 +24,8 @@ public class DiscoveryHistory
@Column(nullable=false)
private Boolean result;
@Column(nullable=false)
@JoinColumn
@OneToOne
private DiscoveryZone zone;
public DiscoveryZone getZone() {

View File

@ -16,7 +16,7 @@ public class DiscoveryPort {
private long id;
@ManyToOne
@JoinColumn(name = "HOST_ID", nullable = false)
@JoinColumn
private DiscoveryHost host;
public DiscoveryHost getHost() {
return host;
@ -54,12 +54,12 @@ public class DiscoveryPort {
public DiscoveryPort() {}
public DiscoveryPort(PortType type, short portNumber) {
public DiscoveryPort(PortType type, int portNumber) {
this.portType = type;
this.portNumber = portNumber;
}
public DiscoveryPort(DiscoveryHost host, PortType type, short portNumber) {
public DiscoveryPort(DiscoveryHost host, PortType type, int portNumber) {
this.host = host;
this.portType = type;
this.portNumber = portNumber;

View File

@ -10,7 +10,7 @@ spring.datasource.driver-class-name=org.h2.Driver
## Hibernate configuration
spring.jpa.database=h2
#spring.jpa.hibernate.ddl-auto=create-drop
spring.jpa.hibernate.ddl-auto=update
spring.jpa.hibernate.ddl-auto=create-drop
#spring.jpa.hibernate.ddl-auto=update
spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy
spring.jpa.show-sql=true