Skip to content

Commit d9680b4

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

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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)