mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
No effective change - adjust test to have at least 1 column on insert
This commit is contained in:
+14
-4
@@ -1,6 +1,4 @@
|
||||
package org.tests.query.cache;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.persistence.CascadeType;
|
||||
@@ -9,6 +7,8 @@ import javax.persistence.FetchType;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.OneToMany;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Entity
|
||||
public class Contract {
|
||||
@@ -16,6 +16,8 @@ public class Contract {
|
||||
@GeneratedValue
|
||||
protected Long id;
|
||||
|
||||
private String name;
|
||||
|
||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "contract")
|
||||
private List<Position> positions;
|
||||
|
||||
@@ -31,7 +33,15 @@ public class Contract {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public List<Position> getPositions() {
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public List<Position> getPositions() {
|
||||
return positions;
|
||||
}
|
||||
|
||||
@@ -46,4 +56,4 @@ public class Contract {
|
||||
public void setAclEntries(final List<AclContainerRelation> aclEntries) {
|
||||
this.aclEntries = aclEntries;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+12
-2
@@ -12,6 +12,8 @@ public class ContractCosts {
|
||||
@GeneratedValue
|
||||
protected Long id;
|
||||
|
||||
String status;
|
||||
|
||||
@NotNull
|
||||
@ManyToOne(cascade = {}, optional = false)
|
||||
private Position position;
|
||||
@@ -24,11 +26,19 @@ public class ContractCosts {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Position getPosition() {
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Position getPosition() {
|
||||
return position;
|
||||
}
|
||||
|
||||
public void setPosition(final Position position) {
|
||||
this.position = position;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+12
-2
@@ -11,6 +11,8 @@ public class Position {
|
||||
@GeneratedValue
|
||||
protected Long id;
|
||||
|
||||
private String name;
|
||||
|
||||
@ManyToOne(cascade = {}, optional = false)
|
||||
private Contract contract;
|
||||
|
||||
@@ -22,11 +24,19 @@ public class Position {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Contract getContract() {
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Contract getContract() {
|
||||
return contract;
|
||||
}
|
||||
|
||||
public void setContract(final Contract contract) {
|
||||
this.contract = contract;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user