Skip to content

Commit d9680b4

Browse files
committed
Adding cascade to @onetomany annotation
1 parent 7d843a3 commit d9680b4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/io/github/ngbsn/model/annotations/field/OneToManyAnnotation.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ public class OneToManyAnnotation implements Annotation {
99

1010
@Override
1111
public String toString() {
12-
return "@OneToMany(mappedBy = \"" + mappedBy + "\")";
12+
return "@OneToMany(mappedBy = \"" + mappedBy + "\"" + ", cascade = CascadeType.ALL, orphanRemoval = true" + ")";
1313
}
1414
}
15+

0 commit comments

Comments
 (0)