mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
* NEW: Ebean reads version from pop.properties and prints it at start up * DDL generation and migration can append a header and platformMigration is prepared to append epilog & prolog to scripts * FIX: Set identity only, if it is not the platform default type * Updated reference scripts * ADD basic support for foreign key migration * DbMigration detects alter foreign keys * tests
23 lines
418 B
Java
23 lines
418 B
Java
package misc.migration.v1_2;
|
|
|
|
import io.ebean.annotation.ConstraintMode;
|
|
import io.ebean.annotation.DbForeignKey;
|
|
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.Id;
|
|
import javax.persistence.ManyToOne;
|
|
import javax.persistence.Table;
|
|
|
|
@Entity
|
|
@Table(name = "migtest_fk_set_null")
|
|
public class DfkSetNull {
|
|
|
|
@Id
|
|
long id;
|
|
|
|
@ManyToOne
|
|
@DbForeignKey(onDelete = ConstraintMode.SET_NULL)
|
|
DfkOne one;
|
|
|
|
}
|