mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Exposed bug 417 (and 408?)
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
package com.avaje.tests.singleTableInheritance.model;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
@Entity
|
||||
@Table(name="warehouses")
|
||||
public class Warehouse {
|
||||
@Id
|
||||
@Column(name="ID")
|
||||
private Integer id;
|
||||
|
||||
@ManyToOne//(optional = false) //todo: should this be nullable with assertions made?
|
||||
@JoinColumn(name = "officeZoneId")
|
||||
private ZoneInternal officeZone;
|
||||
|
||||
@ManyToMany(cascade = CascadeType.PERSIST)
|
||||
@JoinTable(name = "WarehousesShippingZones",
|
||||
joinColumns = { @JoinColumn(name = "warehouseId", referencedColumnName = "ID") },
|
||||
inverseJoinColumns = { @JoinColumn(name = "shippingZoneId", referencedColumnName = "ID") }
|
||||
)
|
||||
private Set<ZoneExternal> shippingZones;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public ZoneInternal getOfficeZone() {
|
||||
return officeZone;
|
||||
}
|
||||
|
||||
public void setOfficeZone(ZoneInternal officeZone) {
|
||||
this.officeZone = officeZone;
|
||||
}
|
||||
|
||||
public Set<ZoneExternal> getShippingZones() {
|
||||
return shippingZones;
|
||||
}
|
||||
|
||||
public void setShippingZones(Set<ZoneExternal> shippingZones) {
|
||||
this.shippingZones = shippingZones;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user