mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
38 lines
663 B
Java
38 lines
663 B
Java
package com.avaje.tests.model.inheritmany;
|
|
|
|
import java.util.List;
|
|
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.Id;
|
|
import javax.persistence.Inheritance;
|
|
import javax.persistence.InheritanceType;
|
|
import javax.persistence.OneToMany;
|
|
|
|
@Entity
|
|
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
|
|
public class IMRoot {
|
|
|
|
@Id
|
|
Long id;
|
|
|
|
@OneToMany(mappedBy="owner")
|
|
List<IMRelated> related;
|
|
|
|
public Long getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(Long id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public List<IMRelated> getRelated() {
|
|
return related;
|
|
}
|
|
|
|
public void setRelated(List<IMRelated> related) {
|
|
this.related = related;
|
|
}
|
|
|
|
}
|