docs(search): add detached-entity safety comment in resolveTags

Addresses @Markus review: tags fetched by findByNameContaining live outside
any transaction; Hibernate's dirty-check never fires on them. The comment
removes the ambiguity for cold readers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-06-07 00:58:03 +02:00
parent 64b7b2315d
commit dc366ed403

View File

@@ -161,6 +161,7 @@ public class NlQueryParserService {
? new ArrayList<>(seen).subList(0, MAX_RESOLVED_TAGS) ? new ArrayList<>(seen).subList(0, MAX_RESOLVED_TAGS)
: new ArrayList<>(seen); : new ArrayList<>(seen);
// safe: entities are detached here; mutation is for DTO projection only, no dirty-check fires
tagService.resolveEffectiveColors(capped); tagService.resolveEffectiveColors(capped);
List<TagHint> hints = capped.stream() List<TagHint> hints = capped.stream()