Skip to content

Commit 36601d2

Browse files
committed
MAIN
- foreign key fields set their value to NULL, if the reference is deleted and they are set to not cascade
1 parent 1b5388b commit 36601d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/src/com/orm/androrm/ForeignKeyField.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public String getConstraint(String fieldName) {
102102
if(mOnDeleteCascade) {
103103
constraint += " ON DELETE CASCADE";
104104
} else {
105-
constraint += " ON DELETE NO ACTION";
105+
constraint += " ON DELETE SET NULL";
106106
}
107107

108108
return constraint;

0 commit comments

Comments
 (0)