From f7416df277e2c18c06f982bd8306eb713209f0a4 Mon Sep 17 00:00:00 2001 From: Peter Hormanns Date: Mon, 28 Jan 2013 15:58:19 +0100 Subject: [PATCH] set CascadeType for Domain-Options --- hsarback/src/de/hsadmin/mods/dom/Domain.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hsarback/src/de/hsadmin/mods/dom/Domain.java b/hsarback/src/de/hsadmin/mods/dom/Domain.java index 07d2c32..6342282 100644 --- a/hsarback/src/de/hsadmin/mods/dom/Domain.java +++ b/hsarback/src/de/hsadmin/mods/dom/Domain.java @@ -6,6 +6,7 @@ import static javax.persistence.GenerationType.SEQUENCE; import java.util.Date; import java.util.Set; +import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.EntityManager; @@ -56,7 +57,7 @@ public class Domain extends AbstractEntity { private String dnsMaster; @AnnFieldIO(validation="[a-zA-Z0-9\\-\\.]*", rw=ReadWriteAccess.READWRITE, referTo=DomainOption.class) - @ManyToMany(fetch=FetchType.EAGER) + @ManyToMany(fetch=FetchType.EAGER, cascade=CascadeType.PERSIST) @JoinTable(name="domain__domain_option", joinColumns={@JoinColumn(name="domain_id", referencedColumnName="domain_id")}, inverseJoinColumns={@JoinColumn(name="domain_option_id", referencedColumnName="domain_option_id")})