mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#919 - io.ebean package initial
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
package org.tests.model.zero;
|
||||
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.Table;
|
||||
import java.util.List;
|
||||
|
||||
@Entity
|
||||
@Table(name = "parent")
|
||||
public class WithZeroParent {
|
||||
@Id
|
||||
@Column(name = "id")
|
||||
private int id;
|
||||
|
||||
String name;
|
||||
|
||||
@OneToMany(mappedBy = "parent", cascade = CascadeType.ALL)
|
||||
private List<WithZero> children;
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public List<WithZero> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren(final List<WithZero> children) {
|
||||
this.children = children;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user