diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 800d58a7..657189d5 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -21,13 +21,11 @@ jobs: steps: - uses: actions/checkout@v4 - - name: run tests in java 17 - uses: s4u/setup-maven-action@v1.14.0 + - name: Set up JDK 17 + uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin' - maven-version: 3.9.4 - - name: Show maven version - run: mvn --version - - name: Build with Maven - run: mvn -B package --file pom.xml + cache: maven + - name: Build with Maven + run: mvn -B package --file pom.xml \ No newline at end of file diff --git a/cosmo-api/pom.xml b/cosmo-api/pom.xml index 7f6404af..824b6352 100644 --- a/cosmo-api/pom.xml +++ b/cosmo-api/pom.xml @@ -4,7 +4,7 @@ net.oneandone.cosmo cosmo-multimodule - 7.0.4-SNAPSHOT + 7.1.0-SNAPSHOT cosmo-api diff --git a/cosmo-core/pom.xml b/cosmo-core/pom.xml index b82995e7..892f44c2 100644 --- a/cosmo-core/pom.xml +++ b/cosmo-core/pom.xml @@ -12,7 +12,7 @@ net.oneandone.cosmo cosmo-multimodule - 7.0.4-SNAPSHOT + 7.1.0-SNAPSHOT 4.0.0 cosmo-core diff --git a/cosmo-core/src/main/java/org/unitedinternet/cosmo/dao/hibernate/ContentDaoImpl.java b/cosmo-core/src/main/java/org/unitedinternet/cosmo/dao/hibernate/ContentDaoImpl.java index 3df81db4..6d9db511 100644 --- a/cosmo-core/src/main/java/org/unitedinternet/cosmo/dao/hibernate/ContentDaoImpl.java +++ b/cosmo-core/src/main/java/org/unitedinternet/cosmo/dao/hibernate/ContentDaoImpl.java @@ -28,6 +28,7 @@ import org.unitedinternet.cosmo.dao.ContentDao; import org.unitedinternet.cosmo.dao.ModelValidationException; import org.unitedinternet.cosmo.model.CollectionItem; +import org.unitedinternet.cosmo.model.CollectionSubscription; import org.unitedinternet.cosmo.model.ContentItem; import org.unitedinternet.cosmo.model.ICalendarItem; import org.unitedinternet.cosmo.model.IcalUidInUseException; @@ -35,6 +36,7 @@ import org.unitedinternet.cosmo.model.NoteItem; import org.unitedinternet.cosmo.model.User; import org.unitedinternet.cosmo.model.hibernate.HibCollectionItem; +import org.unitedinternet.cosmo.model.hibernate.HibCollectionSubscriptionItem; import org.unitedinternet.cosmo.model.hibernate.HibItem; import org.unitedinternet.cosmo.model.hibernate.HibItemTombstone; @@ -346,6 +348,13 @@ private void removeCollectionRecursive(CollectionItem collection) { * Removing a collection does not automatically remove its children. Instead, the association to all the * children is removed, and any children who have no parent collection are then removed. */ + if (collection instanceof HibCollectionSubscriptionItem) { + HibCollectionSubscriptionItem subCollection = (HibCollectionSubscriptionItem) collection; + CollectionSubscription subScription = subCollection.getSubscription(); + if (subScription != null) { + this.em.detach(subScription); + } + } removeItemsFromCollection(collection); this.em.remove(collection); } diff --git a/pom.xml b/pom.xml index 6c08c1b7..ef281aeb 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ net.oneandone.cosmo cosmo-multimodule - 7.0.4-SNAPSHOT + 7.1.0-SNAPSHOT pom cosmo-multimodule CalDAV core implementation server @@ -27,7 +27,7 @@ false UTF-8 - 3.3.1 + 3.4.4 3.0.1 3.2.14 @@ -40,7 +40,7 @@ 1.0.1 4.0.6 - 2.17.2 + 2.18.3 1.1.3 5.10.3