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:
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user