feat(transcription): TranscriptionBlock.mentionedPersons sidecar field
@ElementCollection(LAZY) on List<PersonMention>, mapped to V56's transcription_block_mentioned_persons via explicit @CollectionTable that matches the migration name byte-for-byte (immune to Hibernate naming-strategy changes). @Builder.Default keeps the field initialized to an empty list, so existing transcription block construction stays untouched. Refs #362 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,8 @@ import org.hibernate.annotations.CreationTimestamp;
|
|||||||
import org.hibernate.annotations.UpdateTimestamp;
|
import org.hibernate.annotations.UpdateTimestamp;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@@ -33,6 +35,14 @@ public class TranscriptionBlock {
|
|||||||
@Column(columnDefinition = "TEXT")
|
@Column(columnDefinition = "TEXT")
|
||||||
private String text;
|
private String text;
|
||||||
|
|
||||||
|
@ElementCollection(fetch = FetchType.LAZY)
|
||||||
|
@CollectionTable(
|
||||||
|
name = "transcription_block_mentioned_persons",
|
||||||
|
joinColumns = @JoinColumn(name = "block_id"))
|
||||||
|
@Schema(requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@Builder.Default
|
||||||
|
private List<PersonMention> mentionedPersons = new ArrayList<>();
|
||||||
|
|
||||||
@Column(length = 200)
|
@Column(length = 200)
|
||||||
private String label;
|
private String label;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user