feat(geschichte): restore document management for STORY-type Geschichten (#795) #804
@@ -51,9 +51,10 @@ public interface JourneyItemRepository extends JpaRepository<JourneyItem, UUID>
|
|||||||
* Explicit JPQL — same trap as existsByGeschichteIdAndDocumentId: the transient
|
* Explicit JPQL — same trap as existsByGeschichteIdAndDocumentId: the transient
|
||||||
* getDocumentId() getter makes Spring Data unable to resolve a derived query path.
|
* getDocumentId() getter makes Spring Data unable to resolve a derived query path.
|
||||||
* clearAutomatically = true invalidates the L1 cache so AC-2's "note-carrying survives"
|
* clearAutomatically = true invalidates the L1 cache so AC-2's "note-carrying survives"
|
||||||
* assertion never reads a stale entity.
|
* assertion never reads a stale entity. flushAutomatically = true makes the
|
||||||
|
* flush-before-delete contract explicit rather than relying on Hibernate AUTO flush mode.
|
||||||
*/
|
*/
|
||||||
@Modifying(clearAutomatically = true)
|
@Modifying(clearAutomatically = true, flushAutomatically = true)
|
||||||
@Query("DELETE FROM JourneyItem i WHERE i.document.id = :documentId AND (i.note IS NULL OR i.note = '')")
|
@Query("DELETE FROM JourneyItem i WHERE i.document.id = :documentId AND (i.note IS NULL OR i.note = '')")
|
||||||
int deleteNoteLessByDocumentId(@Param("documentId") UUID documentId);
|
int deleteNoteLessByDocumentId(@Param("documentId") UUID documentId);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user