mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
initial add of EbeanORM server based on v2.8.1
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
package com.avaje.tests.compositekeys.db;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.List;
|
||||
|
||||
@Entity
|
||||
public class Region
|
||||
{
|
||||
@Id
|
||||
private RegionKey key;
|
||||
|
||||
private String description;
|
||||
|
||||
@Version
|
||||
private Long version;
|
||||
|
||||
@OneToMany
|
||||
@JoinColumns({
|
||||
@JoinColumn(name = "customer", referencedColumnName = "customer", insertable = false, updatable = false),
|
||||
@JoinColumn(name = "region", referencedColumnName = "type", insertable = false, updatable = false)
|
||||
})
|
||||
private List<Item> items;
|
||||
|
||||
public RegionKey getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public void setKey(RegionKey key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public Long getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(Long version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public List<Item> getItems() {
|
||||
return items;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user