HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2012-09-21 6c1765c478ee9cc969b02f25ec3c7064c42e407c
nothing changed
1 files modified
5 ■■■■■ changed files
hsarback/src/de/hsadmin/mods/dom/DomainModuleImpl.java 5 ●●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/dom/DomainModuleImpl.java
@@ -11,7 +11,6 @@
import de.hsadmin.core.model.AbstractEntity;
import de.hsadmin.core.model.AbstractModuleImpl;
import de.hsadmin.core.model.AuthorisationException;
import de.hsadmin.core.model.GenericModuleImpl;
import de.hsadmin.core.model.HSAdminException;
import de.hsadmin.mods.email.EMailAddress;
import de.hsadmin.mods.pac.Pac;
@@ -178,9 +177,9 @@
        Query query = em.createQuery("SELECT adr FROM " + EMailAddress.class.getAnnotation(javax.persistence.Entity.class).name() 
                + " adr WHERE adr.domain.name='" + dom.getName() + "'");
        List<?> resultList = query.getResultList();
        GenericModuleImpl helperModule = new GenericModuleImpl(getTransaction());
        for (Object obj : resultList) {
            helperModule.delete((EMailAddress) obj);
            EMailAddress eMailAddress = (EMailAddress) obj;
            em.remove(eMailAddress);
        }
        super.delete(existingEntity);
    }