- Shipped
- October 12, 2026 at 4:04 AM UTC
- Author
- Kamo
- Commit
- 1b103a6
The release reads the note's current NAMED audience before it writes, and the request keeps one persistence context (open-in-view), so those note_audience_members rows are managed when NoteReleaseWriter replaces the audience. Its JPQL bulk DELETE does not evict them, and persisting a row with the same key then threw EntityExistsException: re-releasing a NAMED note to anyone it already named (a new sensitivity, a wider or narrower set) answered 500 and changed nothing. Found live by KamoCollab CP05 Task 40 in sp00verify. replaceAudience detaches the rows the context holds before the bulk delete. NoteReleaseWriterAudienceTest runs it over a real Hibernate session on H2 (red before: EntityExistsException, as in production).
