mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Fixed DbMigration classes (put them in the right place)
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
package misc.migration.v1_1;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Test-model referencing two other tables, which gets dropped for migration test in order to check for correct table drop
|
||||
* procedure (first drop foreign keys, then the tables).
|
||||
*
|
||||
* @author Jonas Pöhler, FOCONIS AG
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "drop_main")
|
||||
public class DropMain {
|
||||
|
||||
@Id
|
||||
Integer id;
|
||||
|
||||
@OneToMany(cascade = CascadeType.ALL, mappedBy = "parent")
|
||||
List<DropRefOne> refsOne;
|
||||
|
||||
@ManyToMany(cascade = CascadeType.ALL)
|
||||
List<DropRefMany> refsMany;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public List<DropRefOne> getRefsOne() {
|
||||
return refsOne;
|
||||
}
|
||||
|
||||
public void setRefsOne(List<DropRefOne> refsOne) {
|
||||
this.refsOne = refsOne;
|
||||
}
|
||||
|
||||
public List<DropRefMany> getRefsMany() {
|
||||
return refsMany;
|
||||
}
|
||||
|
||||
public void setRefsMany(List<DropRefMany> refsMany) {
|
||||
this.refsMany = refsMany;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user