mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#323 - DDL Generation support for foreign key cascade options
Tidy up, no GLOBAL_DEFAULT.
This commit is contained in:
@@ -389,7 +389,7 @@ public class PlatformDdl {
|
||||
}
|
||||
|
||||
protected ConstraintMode withDefault(ConstraintMode mode) {
|
||||
return (mode == null || mode == ConstraintMode.GLOBAL_DEFAULT) ? ConstraintMode.RESTRICT : mode;
|
||||
return (mode == null) ? ConstraintMode.RESTRICT : mode;
|
||||
}
|
||||
|
||||
protected void appendForeignKeyOnDelete(StringBuilder buffer, ConstraintMode mode) {
|
||||
|
||||
@@ -16,8 +16,8 @@ public class PropertyForeignKey {
|
||||
public PropertyForeignKey() {
|
||||
this.noConstraint = true;
|
||||
this.noIndex = false;
|
||||
this.onDelete = ConstraintMode.GLOBAL_DEFAULT;
|
||||
this.onUpdate = ConstraintMode.GLOBAL_DEFAULT;
|
||||
this.onDelete = ConstraintMode.RESTRICT;
|
||||
this.onUpdate = ConstraintMode.RESTRICT;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user