feat(transcription): findByMentionedPersons_PersonId derived query
Spring Data resolves the method name to a join over transcription_block_mentioned_persons, returning every block whose sidecar contains the given personId. The B-tree index on person_id (V56) keeps the lookup O(log n) — required for the rename propagation that fans out to every block referencing the renamed person, and for the future "show all blocks mentioning person X" query on the person detail page. The underscore between MentionedPersons and PersonId is the explicit property-boundary form, immune to ambiguous longest-match parsing if the embeddable later gains another nested object. Refs #362 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -29,6 +29,8 @@ public interface TranscriptionBlockRepository extends JpaRepository<Transcriptio
|
||||
|
||||
Optional<TranscriptionBlock> findByAnnotationId(UUID annotationId);
|
||||
|
||||
List<TranscriptionBlock> findByMentionedPersons_PersonId(UUID personId);
|
||||
|
||||
void deleteByAnnotationId(UUID annotationId);
|
||||
|
||||
int countByDocumentId(UUID documentId);
|
||||
|
||||
Reference in New Issue
Block a user